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

Zhenyu Wang zhenyuw at linux.intel.com
Tue Oct 20 09:29:28 CEST 2009


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...

> 
> 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

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20091020/eb028148/attachment.sig>


More information about the Intel-gfx mailing list