All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Fei Li <fei.li@intel.com>, stable@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/bios: filter out invalid DDC pins from VBT child devices
Date: Wed, 11 Apr 2018 15:53:09 +0300	[thread overview]
Message-ID: <87in8xhpl6.fsf@intel.com> (raw)
In-Reply-To: <152344909140.13225.16972948414004225113@mail.alporthouse.com>

On Wed, 11 Apr 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2018-04-11 10:01:46)
>> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
>> index c5c7530ba157..6db845991a69 100644
>> --- a/drivers/gpu/drm/i915/intel_bios.c
>> +++ b/drivers/gpu/drm/i915/intel_bios.c
>> @@ -1256,7 +1256,6 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
>>                 return;
>>  
>>         aux_channel = child->aux_channel;
>> -       ddc_pin = child->ddc_pin;
>
> Could we scope ddc_pin better?

I thought I'd leave that for follow-up, scoping aux_channel similarly.

>
>>         is_dvi = child->device_type & DEVICE_TYPE_TMDS_DVI_SIGNALING;
>>         is_dp = child->device_type & DEVICE_TYPE_DISPLAYPORT_OUTPUT;
>> @@ -1303,9 +1302,15 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
>>                 DRM_DEBUG_KMS("Port %c is internal DP\n", port_name(port));
>>  
>>         if (is_dvi) {
>> -               info->alternate_ddc_pin = map_ddc_pin(dev_priv, ddc_pin);
>> -
>> -               sanitize_ddc_pin(dev_priv, port);
>> +               ddc_pin = map_ddc_pin(dev_priv, child->ddc_pin);
>> +               if (intel_gmbus_is_valid_pin(dev_priv, ddc_pin)) {
>> +                       info->alternate_ddc_pin = ddc_pin;
>> +                       sanitize_ddc_pin(dev_priv, port);
>> +               } else {
>> +                       DRM_DEBUG_KMS("Port %c has invalid DDC pin %d, "
>> +                                     "reverting to defaults\n",
>> +                                     port_name(port), ddc_pin);
>
> Do we know what the default pin is here?

It's in intel_hdmi_ddc_pin(). I'd rather not call that from here, as all
such functions need to be independent of a lot of driver and output
setup.

> s/reverting/sticking/?
>
> "invalid DDC pin %d in VBT" ? Not sure if that would be clear from the
> message otherwise.

It's a debug, it'll be surrounded by other VBT stuff and will include a
BIOS-related function name.

So...

			DRM_DEBUG_KMS("Port %c has invalid DDC pin %d, "
				      "sticking to defaults\n",
				      port_name(port), ddc_pin);

is this fine?

BR,
Jani.



>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris

-- 
Jani Nikula, Intel Open Source Technology Center

  reply	other threads:[~2018-04-11 12:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11  9:01 [PATCH] drm/i915/bios: filter out invalid DDC pins from VBT child devices Jani Nikula
2018-04-11  9:01 ` Jani Nikula
2018-04-11 10:11 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-04-11 10:12 ` [PATCH] " Jani Nikula
2018-04-11 10:12   ` Jani Nikula
2018-04-11 12:11 ` ✓ Fi.CI.IGT: success for " Patchwork
2018-04-11 12:18 ` [Intel-gfx] [PATCH] " Chris Wilson
2018-04-11 12:18   ` Chris Wilson
2018-04-11 12:53   ` Jani Nikula [this message]
2018-04-11 13:04     ` Chris Wilson

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=87in8xhpl6.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=fei.li@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.