Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: linux-fbdev@vger.kernel.org
Subject: [PATCH 02/15] fbdev: sh_mobile_hdmi: simplify the EDID reading
Date: Fri, 03 Sep 2010 07:19:53 +0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1009030910350.2883@axis700.grange> (raw)

The present SH-Mobile HDMI driver reads and parses the EDID block into a
variable screeninfo object, but since it is still unable to dynamically
reconfigure the framebuffer, it overwrites the EDID information with preset
values again. This patch just uses a temporary variable to store the EDID
timing information instead.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/video/sh_mobile_hdmi.c |   23 +++--------------------
 1 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c
index 2fde08c..03bcb20 100644
--- a/drivers/video/sh_mobile_hdmi.c
+++ b/drivers/video/sh_mobile_hdmi.c
@@ -663,10 +663,9 @@ static void sh_hdmi_configure(struct sh_hdmi *hdmi)
 
 static void sh_hdmi_read_edid(struct sh_hdmi *hdmi)
 {
-	struct fb_var_screeninfo *var = &hdmi->var;
-	struct sh_mobile_hdmi_info *pdata = hdmi->dev->platform_data;
-	struct fb_videomode *lcd_cfg = &pdata->lcd_chan->lcd_cfg;
-	unsigned long height = var->height, width = var->width;
+	struct fb_var_screeninfo tmpvar;
+	/* TODO: When we are ready to use EDID, use this to fill &hdmi->var */
+	struct fb_var_screeninfo *var = &tmpvar;
 	int i;
 	u8 edid[128];
 
@@ -692,22 +691,6 @@ static void sh_hdmi_read_edid(struct sh_hdmi *hdmi)
 		 var->upper_margin, var->yres, var->lower_margin, var->vsync_len,
 		 PICOS2KHZ(var->pixclock));
 
-	/* FIXME: Use user-provided configuration instead of EDID */
-	var->width		= width;
-	var->xres		= lcd_cfg->xres;
-	var->xres_virtual	= lcd_cfg->xres;
-	var->left_margin	= lcd_cfg->left_margin;
-	var->right_margin	= lcd_cfg->right_margin;
-	var->hsync_len		= lcd_cfg->hsync_len;
-	var->height		= height;
-	var->yres		= lcd_cfg->yres;
-	var->yres_virtual	= lcd_cfg->yres * 2;
-	var->upper_margin	= lcd_cfg->upper_margin;
-	var->lower_margin	= lcd_cfg->lower_margin;
-	var->vsync_len		= lcd_cfg->vsync_len;
-	var->sync		= lcd_cfg->sync;
-	var->pixclock		= lcd_cfg->pixclock;
-
 	hdmi_external_video_param(hdmi);
 }
 
-- 
1.7.1


                 reply	other threads:[~2010-09-03  7:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.64.1009030910350.2883@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=linux-fbdev@vger.kernel.org \
    /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