dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: stefan.bruens@rwth-aachen.de
Subject: Re: [PATCH] drm/edid: Check for empty block prior to checksumming
Date: Mon, 17 Nov 2014 11:32:10 +0200	[thread overview]
Message-ID: <87a93quq91.fsf@intel.com> (raw)
In-Reply-To: <f194ba9d-22fe-47e4-81ce-50b32b88ff61@HUB2.rwth-ad.de>

On Sun, 16 Nov 2014, Stefan Brüns <stefan.bruens@rwth-aachen.de> 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@rwth-aachen.de>
> ---
>  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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

      reply	other threads:[~2014-11-17  9:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-16  2:04 [PATCH] drm/edid: Check for empty block prior to checksumming Stefan Brüns
2014-11-17  9:32 ` Jani Nikula [this message]

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=87a93quq91.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=stefan.bruens@rwth-aachen.de \
    /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