Re: [PATCH] drm/edid: Check for empty block prior to checksumming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 16 Nov 2014, Stefan Brüns <stefan.bruens@xxxxxxxxxxxxxx> wrote:
> drm_edid_block_valid will dump the whole EDID block. Shorten the log
> output to a single line stating the block is empty.

I'd think it would be better to teach drm_edid_block_valid to better
handle empty blocks.

BR,
Jani.

>
> Signed-off-by: Stefan Brüns <stefan.bruens@xxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_edid.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 3bf9991..0755d01 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -1198,12 +1198,17 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
>  	for (i = 0; i < 4; i++) {
>  		if (drm_do_probe_ddc_edid(adapter, block, 0, EDID_LENGTH))
>  			goto out;
> -		if (drm_edid_block_valid(block, 0, print_bad_edid))
> -			break;
>  		if (i == 0 && drm_edid_is_zero(block, EDID_LENGTH)) {
>  			connector->null_edid_counter++;
> -			goto carp;
> +			if (print_bad_edid) {
> +				dev_warn(connector->dev->dev, "%s: EDID block 0 empty.\n",
> +					 connector->name);
> +			}
> +			connector->bad_edid_counter++;
> +			goto out;
>  		}
> +		if (drm_edid_block_valid(block, 0, print_bad_edid))
> +			break;
>  	}
>  	if (i == 4)
>  		goto carp;
> -- 
> 1.8.4.5
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux