From patchwork Sat Feb 12 17:02:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Morsing X-Patchwork-Id: 551801 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1CH2Enx004902 for ; Sat, 12 Feb 2011 17:02:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751063Ab1BLRCO (ORCPT ); Sat, 12 Feb 2011 12:02:14 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:54555 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751145Ab1BLRCG (ORCPT ); Sat, 12 Feb 2011 12:02:06 -0500 Received: by mail-fx0-f46.google.com with SMTP id 20so3768653fxm.19 for ; Sat, 12 Feb 2011 09:02:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=f6FWBIqjkTn744g8GM2FMIW1LTl+Rt8hLaKR8HHhBgo=; b=Hb+/TxzJ0I09yDAdM2u2uiPQksKj4SkthSrc80rXe57rk7DmIwyKNjQ/jxWO1eUsOG ydLJdNMqbqf994KioMbRSQBryb6F/yI8UQpeKjTO1HcMoqYVeVhslm9dz48xFd/fE0kq c/mMC/J0wowhvmIiYQax/gv8i0sxOgXhZLvSk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=W9KmX5k/rKOoiFNENOFVwJ/X2BuMmXx+afI8rLcwoms2NCH3GqlQF4342I2Gg3hlAh UoPZ2oMTFy3Go+UArTMRyLOAUCjZzfXBbFWozGi5q44+mTh1YebQKGpkctz51s0eE672 yCG0dBa2X1VVtzSmAoM5x6BHZP5S/AJZpavLs= Received: by 10.223.72.14 with SMTP id k14mr2092038faj.45.1297530125712; Sat, 12 Feb 2011 09:02:05 -0800 (PST) Received: from localhost.localdomain ([188.114.148.132]) by mx.google.com with ESMTPS id n3sm253619fax.7.2011.02.12.09.02.04 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Feb 2011 09:02:05 -0800 (PST) From: Daniel Morsing To: Tony Lindgren , Tomi Valkeinen Cc: Bryan Wu , linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Daniel Morsing Subject: [PATCH 1/2] omap: dss2: Add recommended bpp option for generic dpi panels Date: Sat, 12 Feb 2011 18:02:09 +0100 Message-Id: <1297530130-10355-2-git-send-email-daniel.morsing@gmail.com> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1297530130-10355-1-git-send-email-daniel.morsing@gmail.com> References: <1297530130-10355-1-git-send-email-daniel.morsing@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 12 Feb 2011 17:02:15 +0000 (UTC) diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c index 07eb30e..b52a28f 100644 --- a/drivers/video/omap2/displays/panel-generic-dpi.c +++ b/drivers/video/omap2/displays/panel-generic-dpi.c @@ -43,6 +43,8 @@ struct panel_config { /* Unit: line clocks */ int acb; /* ac-bias pin frequency */ + int recommended_bpp; /* overrides the default bpp */ + enum omap_panel_config config; int power_on_delay; @@ -331,6 +333,17 @@ static int generic_dpi_panel_check_timings(struct omap_dss_device *dssdev, return dpi_check_timings(dssdev, timings); } +static int generic_dpi_panel_get_bpp(struct omap_dss_device *dssdev) +{ + struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev); + struct panel_config *panel_config = drv_data->panel_config; + + if (panel_config->recommended_bpp != 0) + return panel_config->recommended_bpp; + + return omapdss_default_get_recommended_bpp(dssdev); +} + static struct omap_dss_driver dpi_driver = { .probe = generic_dpi_panel_probe, .remove = generic_dpi_panel_remove, @@ -344,6 +357,8 @@ static struct omap_dss_driver dpi_driver = { .get_timings = generic_dpi_panel_get_timings, .check_timings = generic_dpi_panel_check_timings, + .get_recommended_bpp = generic_dpi_panel_get_bpp, + .driver = { .name = "generic_dpi_panel", .owner = THIS_MODULE,