[Intel-gfx] [PATCH] gfx: update the mmheight/mmwidth again after parsing EDID

ykzhao yakui.zhao at intel.com
Thu Oct 22 07:32:30 CEST 2009


On Tue, 2009-10-20 at 15:29 +0800, Zhenyu Wang wrote:
> On 2009.10.20 14:31:47 +0800, yakui.zhao at intel.com wrote:
> > From: Zhao Yakui <yakui.zhao at intel.com>
> > 
> > Sometimes the display mmheight/mmwidth defined in EDID detailed timing block
> > is incorrect for some monitors. After calling the function of xf86OutputSetEDID,
> > it will update the height/midth for the corresponding output by using the value
> > defined in detailed timing. In such case it will cause that the dpi is
> > also incorrect, which causes that font is displayed incorrectly.
> >    For example:
> >      The height/width in EDID detailed timing block is :289 x 21 mm
> >      But the height/wdith about monitor size is 330 x 210 mm.
> > 
> > So after calling the function of xf86OutputSetEDID, Update the height/width
> > again by using the output info, which is obtained in course of output detection.
> > 
> > https://bugs.freedesktop.org/show_bug.cgi?id=24482
> 
> Does this one need any EDID quirks? Looks we should apply quirks to
> EDID data from kernel in xserver too...
In fact we have a quirk for this monitor in xserver. But it is put into
the incorrect case.
The height defined in detailed timing info is incorrect while the
width/height defined in EDID header seems correct, which is used in our
linux kernel driver. 

> 
> > 
> > Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
> > ---
> >  src/drmmode_display.c |    8 ++++++++
> >  1 files changed, 8 insertions(+), 0 deletions(-)
> > 
> > diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> > index 3417cab..626ca1d 100644
> > --- a/src/drmmode_display.c
> > +++ b/src/drmmode_display.c
> > @@ -783,7 +783,14 @@ static int drmmode_output_lvds_edid(xf86OutputPtr output,
> >  	output->MonInfo = edid_mon;
> >  	return 0;
> >  }
> > +static void drmmode_update_output(xf86OutputPtr output)
> > +{
> > +	drmmode_output_private_ptr drmmode_output = output->driver_private;
> > +	drmModeConnectorPtr koutput = drmmode_output->mode_output;
> >  
> > +	output->mm_width = koutput->mmWidth;
> > +	output->mm_height = koutput->mmHeight;
> > +}
> >  static DisplayModePtr
> >  drmmode_output_get_modes(xf86OutputPtr output)
> >  {
> > @@ -824,6 +831,7 @@ drmmode_output_get_modes(xf86OutputPtr output)
> >  				  xf86InterpretEDID(output->scrn->scrnIndex,
> >  						    NULL));
> >  
> > +	drmmode_update_output(output);
> >  	/* modes should already be available */
> >  	for (i = 0; i < koutput->count_modes; i++) {
> >  		Mode = xnfalloc(sizeof(DisplayModeRec));
> > -- 
> > 1.5.4.5
> 




More information about the Intel-gfx mailing list