From: Daniel Morsing <daniel.morsing@gmail.com>
To: Tony Lindgren <tony@atomide.com>, Tomi Valkeinen <tomba@iki.fi>
Cc: Bryan Wu <bryan.wu@canonical.com>,
linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org,
Daniel Morsing <daniel.morsing@gmail.com>
Subject: [PATCH 1/2] omap: dss2: Add recommended bpp option for generic dpi panels
Date: Sat, 12 Feb 2011 18:02:09 +0100 [thread overview]
Message-ID: <1297530130-10355-2-git-send-email-daniel.morsing@gmail.com> (raw)
In-Reply-To: <1297530130-10355-1-git-send-email-daniel.morsing@gmail.com>
Currently, there is no way to specify a recommended bpp for a generic
dpi display. This patch adds a mechanism for doing so.
If no recommended bpp is specified by the driver, we fall back to the
default recommended bpp function
Signed-off-by: Daniel Morsing <daniel.morsing@gmail.com>
---
drivers/video/omap2/displays/panel-generic-dpi.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
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,
--
1.7.4
next prev parent reply other threads:[~2011-02-12 17:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-12 17:02 [PATCH 0/2] Add recommended bpp for omap dss2 generic dpi panels Daniel Morsing
2011-02-12 17:02 ` Daniel Morsing [this message]
2011-02-12 17:02 ` [PATCH 2/2] omap3: devkit8000: Add and use 4.3 inch display Daniel Morsing
2011-02-16 14:42 ` Thomas Weber
2011-02-18 12:36 ` Thomas Weber
2011-02-18 12:55 ` Daniel Morsing
2011-02-18 13:07 ` Tomi Valkeinen
2011-02-18 16:18 ` Daniel Morsing
2011-02-18 16:43 ` Tomi Valkeinen
2011-02-16 13:11 ` [PATCH 0/2] Add recommended bpp for omap dss2 generic dpi panels Tomi Valkeinen
2011-02-16 14:06 ` Daniel Morsing
2011-02-16 14:36 ` Tomi Valkeinen
2011-02-16 15:42 ` Daniel Morsing
2011-02-16 15:58 ` Tomi Valkeinen
2011-02-16 19:22 ` Daniel Morsing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1297530130-10355-2-git-send-email-daniel.morsing@gmail.com \
--to=daniel.morsing@gmail.com \
--cc=bryan.wu@canonical.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tomba@iki.fi \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox