From patchwork Fri Oct 17 14:28:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 38876 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4A424202DB for ; Fri, 17 Oct 2014 14:28:29 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id y10sf544672wgg.6 for ; Fri, 17 Oct 2014 07:28:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=jsQDO3sd/7vjE6c7yL5Q4pI0EyYQmrvlBq68ALZwLPI=; b=lVuUxFFsfT3eIAJqIH8hBE2JDqAYw6fVMP5TkXDJG3dNWYanJ7+2HB8YJxRTbZS9O6 XXrQmfs2tHDKvMkWJJs+DHYGvqVC6hjtWNlQ/suo/P0ZxgemMJJsT1RBzHdiXyLBmya7 YFptzuxifHqOOE/luENEC3H+CcoeWPrzp5ecnLr24Ie07Cok9T6EOFXYJKlbx86jskHy qHasGWTmgo2gPb5LfxdjJHjqmQVSqJwT1FHskfNARBWHtJV2o/B4k8XvkWfbi6deMMmF rqT0enYs8WdizDxoeBhZFQiwGwMS/ncoFTUt7saQpCsmcTO472bYJhju8jmu34PejlsO donw== X-Gm-Message-State: ALoCoQm4ymfNlQFvaPwLMjabtAjR4rOoWg3aGTFk2t2hqikTFclhLZM6xcUzpHp8s7A1FzqXFwb9 X-Received: by 10.180.105.74 with SMTP id gk10mr688358wib.0.1413556108515; Fri, 17 Oct 2014 07:28:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.169 with SMTP id f9ls256477lam.11.gmail; Fri, 17 Oct 2014 07:28:28 -0700 (PDT) X-Received: by 10.112.85.138 with SMTP id h10mr9145826lbz.33.1413556108358; Fri, 17 Oct 2014 07:28:28 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id wb3si2264955lbb.112.2014.10.17.07.28.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 07:28:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id mc6so802291lab.2 for ; Fri, 17 Oct 2014 07:28:28 -0700 (PDT) X-Received: by 10.112.97.135 with SMTP id ea7mr9334996lbb.46.1413556108248; Fri, 17 Oct 2014 07:28:28 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.84.229 with SMTP id c5csp237467lbz; Fri, 17 Oct 2014 07:28:27 -0700 (PDT) X-Received: by 10.194.77.199 with SMTP id u7mr11062443wjw.92.1413556107613; Fri, 17 Oct 2014 07:28:27 -0700 (PDT) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com. [209.85.212.170]) by mx.google.com with ESMTPS id fr3si5993196wic.56.2014.10.17.07.28.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 07:28:27 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.212.170 as permitted sender) client-ip=209.85.212.170; Received: by mail-wi0-f170.google.com with SMTP id hi2so3923234wib.1 for ; Fri, 17 Oct 2014 07:28:27 -0700 (PDT) X-Received: by 10.180.104.7 with SMTP id ga7mr263269wib.1.1413556107338; Fri, 17 Oct 2014 07:28:27 -0700 (PDT) Received: from sundance.lan (cpc4-aztw19-0-0-cust157.18-1.cable.virginm.net. [82.33.25.158]) by mx.google.com with ESMTPSA id q5sm1849937wja.49.2014.10.17.07.28.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Oct 2014 07:28:26 -0700 (PDT) From: Daniel Thompson To: David Airlie Cc: Daniel Thompson , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Rob Clark Subject: [PATCH 3.17] drm/msm: Fix fbdev for 16- and 24-bit modes. Date: Fri, 17 Oct 2014 15:28:08 +0100 Message-Id: <1413556088-30194-1-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Currently forcing the video mode from the kernel command line (for example video=HDMI-A-1:1280x720-16@60) does not correctly set the number of bits per pixel. This is due to a rather aggressive override in msm_fbdev_create(). This is a particular problem for Android bring up because the software EGL fallbacks don't support 32bpp. This problem could be trivially fixed by removing the override completely. However to avoid regressing commit 96673ecbd7f6 ("drm/msm: default to XR24 rather than AR24") this patch continues to override the depth if there are 32 bits per pixel. Change was tested by dd'ing a test image to /dev/fb0 with no video= (still 32bpp, DBG() message observed), video=1920x1080-32@60 (message observed), video=1920x1080-24@60 and video=1920x1080-16@60 . Signed-off-by: Daniel Thompson Cc: David Airlie Cc: Rob Clark --- drivers/gpu/drm/msm/msm_fbdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 1.9.3 diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c index ab5bfd2..ed0171d 100644 --- a/drivers/gpu/drm/msm/msm_fbdev.c +++ b/drivers/gpu/drm/msm/msm_fbdev.c @@ -93,8 +93,10 @@ static int msm_fbdev_create(struct drm_fb_helper *helper, uint32_t paddr; int ret, size; - sizes->surface_bpp = 32; - sizes->surface_depth = 24; + if (sizes->surface_bpp == 32) { + DBG("forcing surface depth to 24\n"); + sizes->surface_depth = 24; + } DBG("create fbdev: %dx%d@%d (%dx%d)", sizes->surface_width, sizes->surface_height, sizes->surface_bpp,