From patchwork Fri Oct 17 15:48:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 5098171 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3FE9EC11AC for ; Fri, 17 Oct 2014 15:49:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7EB1B20200 for ; Fri, 17 Oct 2014 15:49:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 604F1201EF for ; Fri, 17 Oct 2014 15:49:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA6EF6E00E; Fri, 17 Oct 2014 08:49:18 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 390786E00E for ; Fri, 17 Oct 2014 08:49:16 -0700 (PDT) Received: by mail-wi0-f172.google.com with SMTP id n3so2432395wiv.11 for ; Fri, 17 Oct 2014 08:49:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eARNZcbjFOYMvL54zqPSaC9Jdq5wRs8H2p9xpjNHcWk=; b=ZvM6EeXCTYjjcur32EBFGfpErd5ko7yvBsSYpkkDKE6aw6STewwfYnf9gFCCmODCbH exN2wm9hEhbZtSUJMQFN9AFdXTY02EIFmg0sWPz0F5V93EdGPNS77E1aihGNIM24zLfG IEdEyd/do5V0VzwT4rfgHsUTrvwORaf2thbLJtSdLz04J9AUVooBLJ5llBw2PHvY2mlH Sv1loIqgKacxDyxUJQ6Sw7wtkIafi1u5zWsU8yCfvXmA0qVHH/Cut9gsku3LYliXUKCV B68hvDHRVeVUXrHTJMldd6IsFgxw4aYc3VsLbtniJQ/sW7eGM0nSZVQdeYW6Nv+Zp7AB TYlw== X-Gm-Message-State: ALoCoQlt6DqVmIK7RIJPZ6qa3LqnKybkGIOn2iYD1nsXcy28gOiuNhUj04Oc/VU15RXduxxY6t/Z X-Received: by 10.194.250.105 with SMTP id zb9mr4739117wjc.123.1413560954952; Fri, 17 Oct 2014 08:49:14 -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 ws2sm2106244wjc.32.2014.10.17.08.49.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Oct 2014 08:49:14 -0700 (PDT) From: Daniel Thompson To: David Airlie Subject: [PATCH 3.17 v2] drm/msm: Fix fbdev for 16- and 24-bit modes. Date: Fri, 17 Oct 2014 16:48:54 +0100 Message-Id: <1413560934-19268-1-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1413556088-30194-1-git-send-email-daniel.thompson@linaro.org> References: <1413556088-30194-1-git-send-email-daniel.thompson@linaro.org> Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, SUSPICIOUS_RECIPS, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Since the overrides are actually the default values anyway then this problem can be trivially fixed by removing the overrides completely. Change was tested by dd'ing a test image to /dev/fb0 with no video= (still 32bpp), video=1920x1080-32@60, 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 | 3 --- 1 file changed, 3 deletions(-) -- 1.9.3 diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c index ab5bfd2..94d55e5 100644 --- a/drivers/gpu/drm/msm/msm_fbdev.c +++ b/drivers/gpu/drm/msm/msm_fbdev.c @@ -93,9 +93,6 @@ static int msm_fbdev_create(struct drm_fb_helper *helper, uint32_t paddr; int ret, size; - sizes->surface_bpp = 32; - sizes->surface_depth = 24; - DBG("create fbdev: %dx%d@%d (%dx%d)", sizes->surface_width, sizes->surface_height, sizes->surface_bpp, sizes->fb_width, sizes->fb_height);