linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbdev: add a function to parse further EDID Detailed Timing
@ 2010-08-20  6:48 Guennadi Liakhovetski
  2010-08-20  7:23 ` [PATCH] fbdev: add a function to parse further EDID Detailed Erik Gilling
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Guennadi Liakhovetski @ 2010-08-20  6:48 UTC (permalink / raw)
  To: linux-fbdev

Currently a function is available to parse the first EDID Detailed Timing
Descriptor (DTD) block. However, EDID can contain up to four DTDs. Add a
function to parse further DTDs.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/video/fbmon.c |   74 ++++++++++++++++++++++++++++++++++++------------
 include/linux/fb.h    |    2 +
 2 files changed, 57 insertions(+), 19 deletions(-)

diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
index 563a98b..03de586 100644
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -866,6 +866,29 @@ static void get_monspecs(unsigned char *edid, struct fb_monspecs *specs)
 	}
 }
 
+static void fb_edid_to_var(unsigned char *block, struct fb_var_screeninfo *var)
+{
+	var->xres = var->xres_virtual = H_ACTIVE;
+	var->yres = var->yres_virtual = V_ACTIVE;
+	var->height = var->width = 0;
+	var->right_margin = H_SYNC_OFFSET;
+	var->left_margin = (H_ACTIVE + H_BLANKING) -
+		(H_ACTIVE + H_SYNC_OFFSET + H_SYNC_WIDTH);
+	var->upper_margin = V_BLANKING - V_SYNC_OFFSET -
+		V_SYNC_WIDTH;
+	var->lower_margin = V_SYNC_OFFSET;
+	var->hsync_len = H_SYNC_WIDTH;
+	var->vsync_len = V_SYNC_WIDTH;
+	var->pixclock = PIXEL_CLOCK;
+	var->pixclock /= 1000;
+	var->pixclock = KHZ2PICOS(var->pixclock);
+
+	if (HSYNC_POSITIVE)
+		var->sync |= FB_SYNC_HOR_HIGH_ACT;
+	if (VSYNC_POSITIVE)
+		var->sync |= FB_SYNC_VERT_HIGH_ACT;
+}
+
 int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
 {
 	int i;
@@ -884,31 +907,38 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
 
 	for (i = 0; i < 4; i++, block += DETAILED_TIMING_DESCRIPTION_SIZE) {
 		if (edid_is_timing_block(block)) {
-			var->xres = var->xres_virtual = H_ACTIVE;
-			var->yres = var->yres_virtual = V_ACTIVE;
-			var->height = var->width = 0;
-			var->right_margin = H_SYNC_OFFSET;
-			var->left_margin = (H_ACTIVE + H_BLANKING) -
-				(H_ACTIVE + H_SYNC_OFFSET + H_SYNC_WIDTH);
-			var->upper_margin = V_BLANKING - V_SYNC_OFFSET -
-				V_SYNC_WIDTH;
-			var->lower_margin = V_SYNC_OFFSET;
-			var->hsync_len = H_SYNC_WIDTH;
-			var->vsync_len = V_SYNC_WIDTH;
-			var->pixclock = PIXEL_CLOCK;
-			var->pixclock /= 1000;
-			var->pixclock = KHZ2PICOS(var->pixclock);
-
-			if (HSYNC_POSITIVE)
-				var->sync |= FB_SYNC_HOR_HIGH_ACT;
-			if (VSYNC_POSITIVE)
-				var->sync |= FB_SYNC_VERT_HIGH_ACT;
+			fb_edid_to_var(block, var);
 			return 0;
 		}
 	}
 	return 1;
 }
 
+int fb_parse_edid_index(unsigned char *edid, struct fb_var_screeninfo *var,
+			unsigned int idx)
+{
+	unsigned char *block;
+
+	if (edid = NULL || var = NULL || idx > 3)
+		return 1;
+
+	if (!(edid_checksum(edid)))
+		return 1;
+
+	if (!(edid_check_header(edid)))
+		return 1;
+
+	block = edid + DETAILED_TIMING_DESCRIPTIONS_START +
+		idx * DETAILED_TIMING_DESCRIPTION_SIZE;
+
+	if (edid_is_timing_block(block)) {
+		fb_edid_to_var(block, var);
+		return 0;
+	}
+
+	return 1;
+}
+
 void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
 {
 	unsigned char *block;
@@ -1285,6 +1315,11 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
 {
 	return 1;
 }
+int fb_parse_edid_index(unsigned char *edid, struct fb_var_screeninfo *var,
+			unsigned int idx)
+{
+	return 1;
+}
 void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
 {
 	specs = NULL;
@@ -1395,6 +1430,7 @@ const unsigned char *fb_firmware_edid(struct device *device)
 EXPORT_SYMBOL(fb_firmware_edid);
 
 EXPORT_SYMBOL(fb_parse_edid);
+EXPORT_SYMBOL(fb_parse_edid_index);
 EXPORT_SYMBOL(fb_edid_to_monspecs);
 EXPORT_SYMBOL(fb_get_mode);
 EXPORT_SYMBOL(fb_validate_mode);
diff --git a/include/linux/fb.h b/include/linux/fb.h
index f0268de..3649c47 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -1083,6 +1083,8 @@ extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var,
 extern int fb_validate_mode(const struct fb_var_screeninfo *var,
 			    struct fb_info *info);
 extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var);
+extern int fb_parse_edid_index(unsigned char *edid, struct fb_var_screeninfo *var,
+			       unsigned int idx);
 extern const unsigned char *fb_firmware_edid(struct device *device);
 extern void fb_edid_to_monspecs(unsigned char *edid,
 				struct fb_monspecs *specs);
-- 
1.7.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] fbdev: add a function to parse further EDID Detailed
  2010-08-20  6:48 [PATCH] fbdev: add a function to parse further EDID Detailed Timing Guennadi Liakhovetski
@ 2010-08-20  7:23 ` Erik Gilling
  2010-10-20 15:12 ` Guennadi Liakhovetski
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Erik Gilling @ 2010-08-20  7:23 UTC (permalink / raw)
  To: linux-fbdev

Guennadi,
    Not sure how you're using the edid but you can get all 4 DTDs by
calling fb_edid_to_monspecs() then calling fb_videomode_to_var() on
each of the entries in monspecs.modedb.  This is still lacking as
modern monitors/tvs can have multiple EDID blocks.  My recent patch
[1] is a proposal for addressing that.

Cheers,
    Erik

[1] http://marc.info/?l=linux-fbdev&m\x128208740412602&w=2

On Thu, Aug 19, 2010 at 11:48 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> Currently a function is available to parse the first EDID Detailed Timing
> Descriptor (DTD) block. However, EDID can contain up to four DTDs. Add a
> function to parse further DTDs.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>  drivers/video/fbmon.c |   74 ++++++++++++++++++++++++++++++++++++------------
>  include/linux/fb.h    |    2 +
>  2 files changed, 57 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
> index 563a98b..03de586 100644
> --- a/drivers/video/fbmon.c
> +++ b/drivers/video/fbmon.c
> @@ -866,6 +866,29 @@ static void get_monspecs(unsigned char *edid, struct fb_monspecs *specs)
>        }
>  }
>
> +static void fb_edid_to_var(unsigned char *block, struct fb_var_screeninfo *var)
> +{
> +       var->xres = var->xres_virtual = H_ACTIVE;
> +       var->yres = var->yres_virtual = V_ACTIVE;
> +       var->height = var->width = 0;
> +       var->right_margin = H_SYNC_OFFSET;
> +       var->left_margin = (H_ACTIVE + H_BLANKING) -
> +               (H_ACTIVE + H_SYNC_OFFSET + H_SYNC_WIDTH);
> +       var->upper_margin = V_BLANKING - V_SYNC_OFFSET -
> +               V_SYNC_WIDTH;
> +       var->lower_margin = V_SYNC_OFFSET;
> +       var->hsync_len = H_SYNC_WIDTH;
> +       var->vsync_len = V_SYNC_WIDTH;
> +       var->pixclock = PIXEL_CLOCK;
> +       var->pixclock /= 1000;
> +       var->pixclock = KHZ2PICOS(var->pixclock);
> +
> +       if (HSYNC_POSITIVE)
> +               var->sync |= FB_SYNC_HOR_HIGH_ACT;
> +       if (VSYNC_POSITIVE)
> +               var->sync |= FB_SYNC_VERT_HIGH_ACT;
> +}
> +
>  int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
>  {
>        int i;
> @@ -884,31 +907,38 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
>
>        for (i = 0; i < 4; i++, block += DETAILED_TIMING_DESCRIPTION_SIZE) {
>                if (edid_is_timing_block(block)) {
> -                       var->xres = var->xres_virtual = H_ACTIVE;
> -                       var->yres = var->yres_virtual = V_ACTIVE;
> -                       var->height = var->width = 0;
> -                       var->right_margin = H_SYNC_OFFSET;
> -                       var->left_margin = (H_ACTIVE + H_BLANKING) -
> -                               (H_ACTIVE + H_SYNC_OFFSET + H_SYNC_WIDTH);
> -                       var->upper_margin = V_BLANKING - V_SYNC_OFFSET -
> -                               V_SYNC_WIDTH;
> -                       var->lower_margin = V_SYNC_OFFSET;
> -                       var->hsync_len = H_SYNC_WIDTH;
> -                       var->vsync_len = V_SYNC_WIDTH;
> -                       var->pixclock = PIXEL_CLOCK;
> -                       var->pixclock /= 1000;
> -                       var->pixclock = KHZ2PICOS(var->pixclock);
> -
> -                       if (HSYNC_POSITIVE)
> -                               var->sync |= FB_SYNC_HOR_HIGH_ACT;
> -                       if (VSYNC_POSITIVE)
> -                               var->sync |= FB_SYNC_VERT_HIGH_ACT;
> +                       fb_edid_to_var(block, var);
>                        return 0;
>                }
>        }
>        return 1;
>  }
>
> +int fb_parse_edid_index(unsigned char *edid, struct fb_var_screeninfo *var,
> +                       unsigned int idx)
> +{
> +       unsigned char *block;
> +
> +       if (edid = NULL || var = NULL || idx > 3)
> +               return 1;
> +
> +       if (!(edid_checksum(edid)))
> +               return 1;
> +
> +       if (!(edid_check_header(edid)))
> +               return 1;
> +
> +       block = edid + DETAILED_TIMING_DESCRIPTIONS_START +
> +               idx * DETAILED_TIMING_DESCRIPTION_SIZE;
> +
> +       if (edid_is_timing_block(block)) {
> +               fb_edid_to_var(block, var);
> +               return 0;
> +       }
> +
> +       return 1;
> +}
> +
>  void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
>  {
>        unsigned char *block;
> @@ -1285,6 +1315,11 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
>  {
>        return 1;
>  }
> +int fb_parse_edid_index(unsigned char *edid, struct fb_var_screeninfo *var,
> +                       unsigned int idx)
> +{
> +       return 1;
> +}
>  void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
>  {
>        specs = NULL;
> @@ -1395,6 +1430,7 @@ const unsigned char *fb_firmware_edid(struct device *device)
>  EXPORT_SYMBOL(fb_firmware_edid);
>
>  EXPORT_SYMBOL(fb_parse_edid);
> +EXPORT_SYMBOL(fb_parse_edid_index);
>  EXPORT_SYMBOL(fb_edid_to_monspecs);
>  EXPORT_SYMBOL(fb_get_mode);
>  EXPORT_SYMBOL(fb_validate_mode);
> diff --git a/include/linux/fb.h b/include/linux/fb.h
> index f0268de..3649c47 100644
> --- a/include/linux/fb.h
> +++ b/include/linux/fb.h
> @@ -1083,6 +1083,8 @@ extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var,
>  extern int fb_validate_mode(const struct fb_var_screeninfo *var,
>                            struct fb_info *info);
>  extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var);
> +extern int fb_parse_edid_index(unsigned char *edid, struct fb_var_screeninfo *var,
> +                              unsigned int idx);
>  extern const unsigned char *fb_firmware_edid(struct device *device);
>  extern void fb_edid_to_monspecs(unsigned char *edid,
>                                struct fb_monspecs *specs);
> --
> 1.7.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] fbdev: add a function to parse further EDID Detailed
  2010-08-20  6:48 [PATCH] fbdev: add a function to parse further EDID Detailed Timing Guennadi Liakhovetski
  2010-08-20  7:23 ` [PATCH] fbdev: add a function to parse further EDID Detailed Erik Gilling
@ 2010-10-20 15:12 ` Guennadi Liakhovetski
  2010-10-20 23:19 ` Andrew Morton
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Guennadi Liakhovetski @ 2010-10-20 15:12 UTC (permalink / raw)
  To: linux-fbdev

Hi Erik

On Fri, 20 Aug 2010, Erik Gilling wrote:

> Guennadi,
>     Not sure how you're using the edid but you can get all 4 DTDs by
> calling fb_edid_to_monspecs() then calling fb_videomode_to_var() on
> each of the entries in monspecs.modedb.  This is still lacking as
> modern monitors/tvs can have multiple EDID blocks.  My recent patch
> [1] is a proposal for addressing that.

Thanks for your reply, yes, I did switch to using fb_edid_to_monspecs(), 
which does just what I need. However, I would indeed need the extra modes 
from extended EDID blocks, so, your patch would come in handy. What's its 
status? There have been no comments and it's not in next. I would imagine, 
that at least an EXPORT_SYNBOL() and a dummy version for when 
CONFIG_FB_MODE_HELPERS is not set are missing in your patch, but otherwise 
- are there any big objections? I.e., you just need to apply something 
like the diff below. With it applied:

Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Andrew, would you be taking it after the above issues are corrected?

As a TODO: are you planning to add parsing of SVDs to your E-EDID code?

Thanks
Guennadi

diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
index 7a77170..5ba2234 100644
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -1345,6 +1345,9 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
 void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
 {
 }
+void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
+{
+}
 void fb_destroy_modedb(struct fb_videomode *modedb)
 {
 }
@@ -1452,6 +1455,7 @@ EXPORT_SYMBOL(fb_firmware_edid);
 
 EXPORT_SYMBOL(fb_parse_edid);
 EXPORT_SYMBOL(fb_edid_to_monspecs);
+EXPORT_SYMBOL(fb_edid_add_monspecs);
 EXPORT_SYMBOL(fb_get_mode);
 EXPORT_SYMBOL(fb_validate_mode);
 EXPORT_SYMBOL(fb_destroy_modedb);

> 
> Cheers,
>     Erik
> 
> [1] http://marc.info/?l=linux-fbdev&m\x128208740412602&w=2
> 
> On Thu, Aug 19, 2010 at 11:48 PM, Guennadi Liakhovetski
> <g.liakhovetski@gmx.de> wrote:
> > Currently a function is available to parse the first EDID Detailed Timing
> > Descriptor (DTD) block. However, EDID can contain up to four DTDs. Add a
> > function to parse further DTDs.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> >  drivers/video/fbmon.c |   74 ++++++++++++++++++++++++++++++++++++------------
> >  include/linux/fb.h    |    2 +
> >  2 files changed, 57 insertions(+), 19 deletions(-)
> >
> > diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
> > index 563a98b..03de586 100644
> > --- a/drivers/video/fbmon.c
> > +++ b/drivers/video/fbmon.c
> > @@ -866,6 +866,29 @@ static void get_monspecs(unsigned char *edid, struct fb_monspecs *specs)
> >        }
> >  }
> >
> > +static void fb_edid_to_var(unsigned char *block, struct fb_var_screeninfo *var)
> > +{
> > +       var->xres = var->xres_virtual = H_ACTIVE;
> > +       var->yres = var->yres_virtual = V_ACTIVE;
> > +       var->height = var->width = 0;
> > +       var->right_margin = H_SYNC_OFFSET;
> > +       var->left_margin = (H_ACTIVE + H_BLANKING) -
> > +               (H_ACTIVE + H_SYNC_OFFSET + H_SYNC_WIDTH);
> > +       var->upper_margin = V_BLANKING - V_SYNC_OFFSET -
> > +               V_SYNC_WIDTH;
> > +       var->lower_margin = V_SYNC_OFFSET;
> > +       var->hsync_len = H_SYNC_WIDTH;
> > +       var->vsync_len = V_SYNC_WIDTH;
> > +       var->pixclock = PIXEL_CLOCK;
> > +       var->pixclock /= 1000;
> > +       var->pixclock = KHZ2PICOS(var->pixclock);
> > +
> > +       if (HSYNC_POSITIVE)
> > +               var->sync |= FB_SYNC_HOR_HIGH_ACT;
> > +       if (VSYNC_POSITIVE)
> > +               var->sync |= FB_SYNC_VERT_HIGH_ACT;
> > +}
> > +
> >  int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
> >  {
> >        int i;
> > @@ -884,31 +907,38 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
> >
> >        for (i = 0; i < 4; i++, block += DETAILED_TIMING_DESCRIPTION_SIZE) {
> >                if (edid_is_timing_block(block)) {
> > -                       var->xres = var->xres_virtual = H_ACTIVE;
> > -                       var->yres = var->yres_virtual = V_ACTIVE;
> > -                       var->height = var->width = 0;
> > -                       var->right_margin = H_SYNC_OFFSET;
> > -                       var->left_margin = (H_ACTIVE + H_BLANKING) -
> > -                               (H_ACTIVE + H_SYNC_OFFSET + H_SYNC_WIDTH);
> > -                       var->upper_margin = V_BLANKING - V_SYNC_OFFSET -
> > -                               V_SYNC_WIDTH;
> > -                       var->lower_margin = V_SYNC_OFFSET;
> > -                       var->hsync_len = H_SYNC_WIDTH;
> > -                       var->vsync_len = V_SYNC_WIDTH;
> > -                       var->pixclock = PIXEL_CLOCK;
> > -                       var->pixclock /= 1000;
> > -                       var->pixclock = KHZ2PICOS(var->pixclock);
> > -
> > -                       if (HSYNC_POSITIVE)
> > -                               var->sync |= FB_SYNC_HOR_HIGH_ACT;
> > -                       if (VSYNC_POSITIVE)
> > -                               var->sync |= FB_SYNC_VERT_HIGH_ACT;
> > +                       fb_edid_to_var(block, var);
> >                        return 0;
> >                }
> >        }
> >        return 1;
> >  }
> >
> > +int fb_parse_edid_index(unsigned char *edid, struct fb_var_screeninfo *var,
> > +                       unsigned int idx)
> > +{
> > +       unsigned char *block;
> > +
> > +       if (edid = NULL || var = NULL || idx > 3)
> > +               return 1;
> > +
> > +       if (!(edid_checksum(edid)))
> > +               return 1;
> > +
> > +       if (!(edid_check_header(edid)))
> > +               return 1;
> > +
> > +       block = edid + DETAILED_TIMING_DESCRIPTIONS_START +
> > +               idx * DETAILED_TIMING_DESCRIPTION_SIZE;
> > +
> > +       if (edid_is_timing_block(block)) {
> > +               fb_edid_to_var(block, var);
> > +               return 0;
> > +       }
> > +
> > +       return 1;
> > +}
> > +
> >  void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
> >  {
> >        unsigned char *block;
> > @@ -1285,6 +1315,11 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
> >  {
> >        return 1;
> >  }
> > +int fb_parse_edid_index(unsigned char *edid, struct fb_var_screeninfo *var,
> > +                       unsigned int idx)
> > +{
> > +       return 1;
> > +}
> >  void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
> >  {
> >        specs = NULL;
> > @@ -1395,6 +1430,7 @@ const unsigned char *fb_firmware_edid(struct device *device)
> >  EXPORT_SYMBOL(fb_firmware_edid);
> >
> >  EXPORT_SYMBOL(fb_parse_edid);
> > +EXPORT_SYMBOL(fb_parse_edid_index);
> >  EXPORT_SYMBOL(fb_edid_to_monspecs);
> >  EXPORT_SYMBOL(fb_get_mode);
> >  EXPORT_SYMBOL(fb_validate_mode);
> > diff --git a/include/linux/fb.h b/include/linux/fb.h
> > index f0268de..3649c47 100644
> > --- a/include/linux/fb.h
> > +++ b/include/linux/fb.h
> > @@ -1083,6 +1083,8 @@ extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var,
> >  extern int fb_validate_mode(const struct fb_var_screeninfo *var,
> >                            struct fb_info *info);
> >  extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var);
> > +extern int fb_parse_edid_index(unsigned char *edid, struct fb_var_screeninfo *var,
> > +                              unsigned int idx);
> >  extern const unsigned char *fb_firmware_edid(struct device *device);
> >  extern void fb_edid_to_monspecs(unsigned char *edid,
> >                                struct fb_monspecs *specs);
> > --
> > 1.7.2
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] fbdev: add a function to parse further EDID Detailed
  2010-08-20  6:48 [PATCH] fbdev: add a function to parse further EDID Detailed Timing Guennadi Liakhovetski
  2010-08-20  7:23 ` [PATCH] fbdev: add a function to parse further EDID Detailed Erik Gilling
  2010-10-20 15:12 ` Guennadi Liakhovetski
@ 2010-10-20 23:19 ` Andrew Morton
  2010-10-20 23:56 ` Dave Airlie
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2010-10-20 23:19 UTC (permalink / raw)
  To: linux-fbdev

On Wed, 20 Oct 2010 17:12:05 +0200 (CEST)
Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:

> Hi Erik
> 
> On Fri, 20 Aug 2010, Erik Gilling wrote:
> 
> > Guennadi,
> >     Not sure how you're using the edid but you can get all 4 DTDs by
> > calling fb_edid_to_monspecs() then calling fb_videomode_to_var() on
> > each of the entries in monspecs.modedb.  This is still lacking as
> > modern monitors/tvs can have multiple EDID blocks.  My recent patch
> > [1] is a proposal for addressing that.
> 
> Thanks for your reply, yes, I did switch to using fb_edid_to_monspecs(), 
> which does just what I need. However, I would indeed need the extra modes 
> from extended EDID blocks, so, your patch would come in handy. What's its 
> status? There have been no comments and it's not in next. I would imagine, 
> that at least an EXPORT_SYNBOL() and a dummy version for when 
> CONFIG_FB_MODE_HELPERS is not set are missing in your patch, but otherwise 
> - are there any big objections? I.e., you just need to apply something 
> like the diff below. With it applied:
> 
> Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> 
> Andrew, would you be taking it after the above issues are corrected?

Sure.  Please cc me on the next version.

> As a TODO: are you planning to add parsing of SVDs to your E-EDID code?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] fbdev: add a function to parse further EDID Detailed
  2010-08-20  6:48 [PATCH] fbdev: add a function to parse further EDID Detailed Timing Guennadi Liakhovetski
                   ` (2 preceding siblings ...)
  2010-10-20 23:19 ` Andrew Morton
@ 2010-10-20 23:56 ` Dave Airlie
  2010-10-21  8:26 ` Geert Uytterhoeven
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Dave Airlie @ 2010-10-20 23:56 UTC (permalink / raw)
  To: linux-fbdev

On Fri, Aug 20, 2010 at 5:23 PM, Erik Gilling <konkers@google.com> wrote:
> Guennadi,
>    Not sure how you're using the edid but you can get all 4 DTDs by
> calling fb_edid_to_monspecs() then calling fb_videomode_to_var() on
> each of the entries in monspecs.modedb.  This is still lacking as
> modern monitors/tvs can have multiple EDID blocks.  My recent patch
> [1] is a proposal for addressing that.

If someone is really interested in fixing up the fbdev EDID parser
they probably should look at sharing the drm EDID parser, its a lot
more complete and came mostly from the EDID parser in the X server.

Dave.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] fbdev: add a function to parse further EDID Detailed
  2010-08-20  6:48 [PATCH] fbdev: add a function to parse further EDID Detailed Timing Guennadi Liakhovetski
                   ` (3 preceding siblings ...)
  2010-10-20 23:56 ` Dave Airlie
@ 2010-10-21  8:26 ` Geert Uytterhoeven
  2010-10-21  8:47 ` Dave Airlie
  2010-10-21 14:08 ` Guennadi Liakhovetski
  6 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2010-10-21  8:26 UTC (permalink / raw)
  To: linux-fbdev

On Thu, Oct 21, 2010 at 01:56, Dave Airlie <airlied@gmail.com> wrote:
> On Fri, Aug 20, 2010 at 5:23 PM, Erik Gilling <konkers@google.com> wrote:
>> Guennadi,
>>    Not sure how you're using the edid but you can get all 4 DTDs by
>> calling fb_edid_to_monspecs() then calling fb_videomode_to_var() on
>> each of the entries in monspecs.modedb.  This is still lacking as
>> modern monitors/tvs can have multiple EDID blocks.  My recent patch
>> [1] is a proposal for addressing that.
>
> If someone is really interested in fixing up the fbdev EDID parser
> they probably should look at sharing the drm EDID parser, its a lot
> more complete and came mostly from the EDID parser in the X server.

Funny, where do you think the fbdev EDID parser came from?

So I can only conclude that instead of updating/improving the fbdev one,
a new one was duplicated/created, the DRM one? ;-)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] fbdev: add a function to parse further EDID Detailed
  2010-08-20  6:48 [PATCH] fbdev: add a function to parse further EDID Detailed Timing Guennadi Liakhovetski
                   ` (4 preceding siblings ...)
  2010-10-21  8:26 ` Geert Uytterhoeven
@ 2010-10-21  8:47 ` Dave Airlie
  2010-10-21 14:08 ` Guennadi Liakhovetski
  6 siblings, 0 replies; 8+ messages in thread
From: Dave Airlie @ 2010-10-21  8:47 UTC (permalink / raw)
  To: linux-fbdev

On Thu, Oct 21, 2010 at 6:26 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Thu, Oct 21, 2010 at 01:56, Dave Airlie <airlied@gmail.com> wrote:
>> On Fri, Aug 20, 2010 at 5:23 PM, Erik Gilling <konkers@google.com> wrote:
>>> Guennadi,
>>>    Not sure how you're using the edid but you can get all 4 DTDs by
>>> calling fb_edid_to_monspecs() then calling fb_videomode_to_var() on
>>> each of the entries in monspecs.modedb.  This is still lacking as
>>> modern monitors/tvs can have multiple EDID blocks.  My recent patch
>>> [1] is a proposal for addressing that.
>>
>> If someone is really interested in fixing up the fbdev EDID parser
>> they probably should look at sharing the drm EDID parser, its a lot
>> more complete and came mostly from the EDID parser in the X server.
>
> Funny, where do you think the fbdev EDID parser came from?

Guess where it came from 4-5 years ago, X moved on a long way since then.

> So I can only conclude that instead of updating/improving the fbdev one,
> a new one was duplicated/created, the DRM one? ;-)

Pretty much,

the fbdev edid parser had built up a lot of one-off fixes for various
scenarios, has had no major testing in non-embedded environments, it
was felt a clean start with the X one would have a better chance of
working without regressing the fbdev one.

I would like to provide the DRM one in a compatible manner to fbdev
users, its not a top priority for me but if someone really wants a
decent EDID parser that can handle modern monitors scenarios then I
would recommend investing in sharing that code than trying to make the
fbdev one do all the stuff it can't do now.

The fbdev edid parser last seen any major code updates in 2008 and the
fb layer was missing any sort of active maintainer which also led to
that decision.

Dave.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] fbdev: add a function to parse further EDID Detailed
  2010-08-20  6:48 [PATCH] fbdev: add a function to parse further EDID Detailed Timing Guennadi Liakhovetski
                   ` (5 preceding siblings ...)
  2010-10-21  8:47 ` Dave Airlie
@ 2010-10-21 14:08 ` Guennadi Liakhovetski
  6 siblings, 0 replies; 8+ messages in thread
From: Guennadi Liakhovetski @ 2010-10-21 14:08 UTC (permalink / raw)
  To: linux-fbdev

On Thu, 21 Oct 2010, Dave Airlie wrote:

> On Fri, Aug 20, 2010 at 5:23 PM, Erik Gilling <konkers@google.com> wrote:
> > Guennadi,
> >    Not sure how you're using the edid but you can get all 4 DTDs by
> > calling fb_edid_to_monspecs() then calling fb_videomode_to_var() on
> > each of the entries in monspecs.modedb.  This is still lacking as
> > modern monitors/tvs can have multiple EDID blocks.  My recent patch
> > [1] is a proposal for addressing that.
> 
> If someone is really interested in fixing up the fbdev EDID parser
> they probably should look at sharing the drm EDID parser, its a lot
> more complete and came mostly from the EDID parser in the X server.

I might be overseeing something, but in next/master I don't see any code 
to parse SVDs in DRM. Could someone, please, point me out to it, if it is 
indeed implemented?

If it is not implemented - how would one do it? Do I understand it right, 
that the precise timing for those modes should be copied from the 
CEA/EIA-861E document?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-10-21 14:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-20  6:48 [PATCH] fbdev: add a function to parse further EDID Detailed Timing Guennadi Liakhovetski
2010-08-20  7:23 ` [PATCH] fbdev: add a function to parse further EDID Detailed Erik Gilling
2010-10-20 15:12 ` Guennadi Liakhovetski
2010-10-20 23:19 ` Andrew Morton
2010-10-20 23:56 ` Dave Airlie
2010-10-21  8:26 ` Geert Uytterhoeven
2010-10-21  8:47 ` Dave Airlie
2010-10-21 14:08 ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).