Re: [Intel-gfx] [PATCH v3 3/4] drm/i915: Clean up DDI DDC/AUX CH sanitation

2016-10-20 Thread Maarten Maathuis
I meant DON't suspect

On Thu, Oct 20, 2016 at 11:53 PM, Maarten Maathuis <madman2...@gmail.com>
wrote:

> Also tested v3 on top of 4.8.3 (mainline git is a mess right now for
> booting).
>
> I did encounter a seemingly unrelated message during boot (including a
> WARN_ON):
> [drm:skylake_pfit_enable [i915]] *ERROR* Requesting pfit without getting a
> scaler first
>
> I suspect any causal relation with these patches.
>
> On Mon, Oct 17, 2016 at 8:07 PM, <ville.syrj...@linux.intel.com> wrote:
>
>> From: Ville Syrjälä <ville.syrj...@linux.intel.com>
>>
>> Now that we use the AUX and GMBUS assignment from VBT for all ports,
>> let's clean up the sanitization of the port information a bit.
>> Previosuly we only did this for port E, and only complained about a
>> non-standard assignment for the other ports. But as we know that
>> non-standard assignments are a fact of life, let's expand the
>> sanitization to all the ports.
>>
>> v2: Include a commit message, fix up the comments a bit
>> v3: Don't clobber other ports if the current port has no alternate aux
>> ch/ddc pin
>>
>> Cc: sta...@vger.kernel.org
>> Cc: Maarten Maathuis <madman2...@gmail.com>
>> Tested-by: Maarten Maathuis <madman2...@gmail.com>
>> References: https://bugs.freedesktop.org/show_bug.cgi?id=97877
>> Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
>> Link: http://patchwork.freedesktop.org/patch/msgid/1476208368-5710
>> -4-git-send-email-ville.syrj...@linux.intel.com
>> Reviewed-by: Jim Bride <jim.br...@linux.intel.com> (v2)
>> ---
>>  drivers/gpu/drm/i915/intel_bios.c | 122 --
>> 
>>  1 file changed, 77 insertions(+), 45 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_bios.c
>> b/drivers/gpu/drm/i915/intel_bios.c
>> index 83667e8cdd6b..a8ff8c099685 100644
>> --- a/drivers/gpu/drm/i915/intel_bios.c
>> +++ b/drivers/gpu/drm/i915/intel_bios.c
>> @@ -1035,6 +1035,77 @@ static u8 translate_iboost(u8 val)
>> return mapping[val];
>>  }
>>
>> +static void sanitize_ddc_pin(struct drm_i915_private *dev_priv,
>> +enum port port)
>> +{
>> +   const struct ddi_vbt_port_info *info =
>> +   _priv->vbt.ddi_port_info[port];
>> +   enum port p;
>> +
>> +   if (!info->alternate_ddc_pin)
>> +   return;
>> +
>> +   for_each_port_masked(p, (1 << port) - 1) {
>> +   struct ddi_vbt_port_info *i =
>> _priv->vbt.ddi_port_info[p];
>> +
>> +   if (info->alternate_ddc_pin != i->alternate_ddc_pin)
>> +   continue;
>> +
>> +   DRM_DEBUG_KMS("port %c trying to use the same DDC pin
>> (0x%x) as port %c, "
>> + "disabling port %c DVI/HDMI support\n",
>> + port_name(p), i->alternate_ddc_pin,
>> + port_name(port), port_name(p));
>> +
>> +   /*
>> +* If we have multiple ports supposedly sharing the
>> +* pin, then dvi/hdmi couldn't exist on the shared
>> +* port. Otherwise they share the same ddc bin and
>> +* system couldn't communicate with them separately.
>> +*
>> +* Due to parsing the ports in alphabetical order,
>> +* a higher port will always clobber a lower one.
>> +*/
>> +   i->supports_dvi = false;
>> +   i->supports_hdmi = false;
>> +   i->alternate_ddc_pin = 0;
>> +   }
>> +}
>> +
>> +static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
>> +   enum port port)
>> +{
>> +   const struct ddi_vbt_port_info *info =
>> +   _priv->vbt.ddi_port_info[port];
>> +   enum port p;
>> +
>> +   if (!info->alternate_aux_channel)
>> +   return;
>> +
>> +   for_each_port_masked(p, (1 << port) - 1) {
>> +   struct ddi_vbt_port_info *i =
>> _priv->vbt.ddi_port_info[p];
>> +
>> +   if (info->alternate_aux_channel !=
>> i->alternate_aux_channel)
>> +   continue;
>> +
>> +   DRM_DEBUG_KMS("port %c trying to use the same AUX CH
>> (0x%x) as port %c, "
>> + "dis

Re: [Intel-gfx] [PATCH v3 3/4] drm/i915: Clean up DDI DDC/AUX CH sanitation

2016-10-20 Thread Maarten Maathuis
Also tested v3 on top of 4.8.3 (mainline git is a mess right now for
booting).

I did encounter a seemingly unrelated message during boot (including a
WARN_ON):
[drm:skylake_pfit_enable [i915]] *ERROR* Requesting pfit without getting a
scaler first

I suspect any causal relation with these patches.

On Mon, Oct 17, 2016 at 8:07 PM, <ville.syrj...@linux.intel.com> wrote:

> From: Ville Syrjälä <ville.syrj...@linux.intel.com>
>
> Now that we use the AUX and GMBUS assignment from VBT for all ports,
> let's clean up the sanitization of the port information a bit.
> Previosuly we only did this for port E, and only complained about a
> non-standard assignment for the other ports. But as we know that
> non-standard assignments are a fact of life, let's expand the
> sanitization to all the ports.
>
> v2: Include a commit message, fix up the comments a bit
> v3: Don't clobber other ports if the current port has no alternate aux
> ch/ddc pin
>
> Cc: sta...@vger.kernel.org
> Cc: Maarten Maathuis <madman2...@gmail.com>
> Tested-by: Maarten Maathuis <madman2...@gmail.com>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=97877
> Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
> Link: http://patchwork.freedesktop.org/patch/msgid/1476208368-
> 5710-4-git-send-email-ville.syrj...@linux.intel.com
> Reviewed-by: Jim Bride <jim.br...@linux.intel.com> (v2)
> ---
>  drivers/gpu/drm/i915/intel_bios.c | 122 --
> 
>  1 file changed, 77 insertions(+), 45 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c
> b/drivers/gpu/drm/i915/intel_bios.c
> index 83667e8cdd6b..a8ff8c099685 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1035,6 +1035,77 @@ static u8 translate_iboost(u8 val)
> return mapping[val];
>  }
>
> +static void sanitize_ddc_pin(struct drm_i915_private *dev_priv,
> +enum port port)
> +{
> +   const struct ddi_vbt_port_info *info =
> +   _priv->vbt.ddi_port_info[port];
> +   enum port p;
> +
> +   if (!info->alternate_ddc_pin)
> +   return;
> +
> +   for_each_port_masked(p, (1 << port) - 1) {
> +   struct ddi_vbt_port_info *i = _priv->vbt.ddi_port_info[
> p];
> +
> +   if (info->alternate_ddc_pin != i->alternate_ddc_pin)
> +   continue;
> +
> +   DRM_DEBUG_KMS("port %c trying to use the same DDC pin
> (0x%x) as port %c, "
> + "disabling port %c DVI/HDMI support\n",
> + port_name(p), i->alternate_ddc_pin,
> + port_name(port), port_name(p));
> +
> +   /*
> +* If we have multiple ports supposedly sharing the
> +* pin, then dvi/hdmi couldn't exist on the shared
> +* port. Otherwise they share the same ddc bin and
> +* system couldn't communicate with them separately.
> +*
> +* Due to parsing the ports in alphabetical order,
> +* a higher port will always clobber a lower one.
> +*/
> +   i->supports_dvi = false;
> +   i->supports_hdmi = false;
> +   i->alternate_ddc_pin = 0;
> +   }
> +}
> +
> +static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
> +   enum port port)
> +{
> +   const struct ddi_vbt_port_info *info =
> +   _priv->vbt.ddi_port_info[port];
> +   enum port p;
> +
> +   if (!info->alternate_aux_channel)
> +   return;
> +
> +   for_each_port_masked(p, (1 << port) - 1) {
> +   struct ddi_vbt_port_info *i = _priv->vbt.ddi_port_info[
> p];
> +
> +   if (info->alternate_aux_channel !=
> i->alternate_aux_channel)
> +   continue;
> +
> +   DRM_DEBUG_KMS("port %c trying to use the same AUX CH
> (0x%x) as port %c, "
> + "disabling port %c DP support\n",
> + port_name(p), i->alternate_aux_channel,
> + port_name(port), port_name(p));
> +
> +   /*
> +* If we have multiple ports supposedlt sharing the
> +* aux channel, then DP couldn't exist on the shared
> +* port. Otherwise they share the same aux channel
> +* and system couldn't communicate with them separately.
> +*
> +  

Re: [Intel-gfx] [PATCH 2/4] drm/i915: Respect alternate_ddc_pin for all DDI ports

2016-10-12 Thread Maarten Maathuis
Retested the _2 branch, works fine as well.

On Wed, Oct 12, 2016 at 12:57 PM, Ville Syrjälä <
ville.syrj...@linux.intel.com> wrote:

> On Tue, Oct 11, 2016 at 10:04:00PM +0200, Maarten Maathuis wrote:
> > My name does not include the word "show" (Tested-by tag).
>
> Sorry about that. Some copy-paste fail I suspect. I'll fix it up.
>
> And you actually tested the v1 patches, so I totally forgot to note that
> in the tested-by tags :( Care to re-test these v2 versions, just to make
> sure I didn't seriously fumble anything?
>
> >
> > On Tue, Oct 11, 2016 at 7:52 PM, <ville.syrj...@linux.intel.com> wrote:
> >
> > > From: Ville Syrjälä <ville.syrj...@linux.intel.com>
> > >
> > > The VBT provides the platform a way to mix and match the DDI ports vs.
> > > GMBUS pins. Currently we only trust the VBT for DDI E, which I suppose
> > > has no standard GMBUS pin assignment. However, there are machines out
> > > there that use a non-standard mapping for the other ports as well.
> > > Let's start trusting the VBT on this one for all ports on DDI
> platforms.
> > >
> > > I've structured the code such that other platforms could easily start
> > > using this as well, by simply filling in the ddi_port_info. IIRC there
> > > may be CHV system that might actually need this.
> > >
> > > v2: Include a commit message, include a debug message during init
> > >
> > > Cc: sta...@vger.kernel.org
> > > Cc: Maarten Maathuis <madman2...@gmail.com>
> > > Tested-by: Maarten Maatt show huis <madman2...@gmail.com>
> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97877
> > > Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_hdmi.c | 84 ++
> > > -
> > >  1 file changed, 48 insertions(+), 36 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c
> > > b/drivers/gpu/drm/i915/intel_hdmi.c
> > > index 8d46f5836746..9ca86e901fc8 100644
> > > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > > @@ -1799,6 +1799,50 @@ intel_hdmi_add_properties(struct intel_hdmi
> > > *intel_hdmi, struct drm_connector *c
> > > intel_hdmi->aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
> > >  }
> > >
> > > +static u8 intel_hdmi_ddc_pin(struct drm_i915_private *dev_priv,
> > > +enum port port)
> > > +{
> > > +   const struct ddi_vbt_port_info *info =
> > > +   _priv->vbt.ddi_port_info[port];
> > > +   u8 ddc_pin;
> > > +
> > > +   if (info->alternate_ddc_pin) {
> > > +   DRM_DEBUG_KMS("Using DDC pin 0x%x for port %c (VBT)\n",
> > > + info->alternate_ddc_pin,
> port_name(port));
> > > +   return info->alternate_ddc_pin;
> > > +   }
> > > +
> > > +   switch (port) {
> > > +   case PORT_B:
> > > +   if (IS_BROXTON(dev_priv))
> > > +   ddc_pin = GMBUS_PIN_1_BXT;
> > > +   else
> > > +   ddc_pin = GMBUS_PIN_DPB;
> > > +   break;
> > > +   case PORT_C:
> > > +   if (IS_BROXTON(dev_priv))
> > > +   ddc_pin = GMBUS_PIN_2_BXT;
> > > +   else
> > > +   ddc_pin = GMBUS_PIN_DPC;
> > > +   break;
> > > +   case PORT_D:
> > > +   if (IS_CHERRYVIEW(dev_priv))
> > > +   ddc_pin = GMBUS_PIN_DPD_CHV;
> > > +   else
> > > +   ddc_pin = GMBUS_PIN_DPD;
> > > +   break;
> > > +   default:
> > > +   MISSING_CASE(port);
> > > +   ddc_pin = GMBUS_PIN_DPB;
> > > +   break;
> > > +   }
> > > +
> > > +   DRM_DEBUG_KMS("Using DDC pin 0x%x for port %c (platform
> > > default)\n",
> > > + ddc_pin, port_name(port));
> > > +
> > > +   return ddc_pin;
> > > +}
> > > +
> > >  void intel_hdmi_init_connector(struct intel_digital_port
> *intel_dig_port,
> > >struct intel_connector *intel_connector)
> > >  {
> > > @

Re: [Intel-gfx] [PATCH 2/4] drm/i915: Respect alternate_ddc_pin for all DDI ports

2016-10-11 Thread Maarten Maathuis
My name does not include the word "show" (Tested-by tag).

On Tue, Oct 11, 2016 at 7:52 PM, <ville.syrj...@linux.intel.com> wrote:

> From: Ville Syrjälä <ville.syrj...@linux.intel.com>
>
> The VBT provides the platform a way to mix and match the DDI ports vs.
> GMBUS pins. Currently we only trust the VBT for DDI E, which I suppose
> has no standard GMBUS pin assignment. However, there are machines out
> there that use a non-standard mapping for the other ports as well.
> Let's start trusting the VBT on this one for all ports on DDI platforms.
>
> I've structured the code such that other platforms could easily start
> using this as well, by simply filling in the ddi_port_info. IIRC there
> may be CHV system that might actually need this.
>
> v2: Include a commit message, include a debug message during init
>
> Cc: sta...@vger.kernel.org
> Cc: Maarten Maathuis <madman2...@gmail.com>
> Tested-by: Maarten Maatt show huis <madman2...@gmail.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97877
> Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c | 84 ++
> -
>  1 file changed, 48 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c
> b/drivers/gpu/drm/i915/intel_hdmi.c
> index 8d46f5836746..9ca86e901fc8 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1799,6 +1799,50 @@ intel_hdmi_add_properties(struct intel_hdmi
> *intel_hdmi, struct drm_connector *c
> intel_hdmi->aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
>  }
>
> +static u8 intel_hdmi_ddc_pin(struct drm_i915_private *dev_priv,
> +enum port port)
> +{
> +   const struct ddi_vbt_port_info *info =
> +   _priv->vbt.ddi_port_info[port];
> +   u8 ddc_pin;
> +
> +   if (info->alternate_ddc_pin) {
> +   DRM_DEBUG_KMS("Using DDC pin 0x%x for port %c (VBT)\n",
> + info->alternate_ddc_pin, port_name(port));
> +   return info->alternate_ddc_pin;
> +   }
> +
> +   switch (port) {
> +   case PORT_B:
> +   if (IS_BROXTON(dev_priv))
> +   ddc_pin = GMBUS_PIN_1_BXT;
> +   else
> +   ddc_pin = GMBUS_PIN_DPB;
> +   break;
> +   case PORT_C:
> +   if (IS_BROXTON(dev_priv))
> +   ddc_pin = GMBUS_PIN_2_BXT;
> +   else
> +   ddc_pin = GMBUS_PIN_DPC;
> +   break;
> +   case PORT_D:
> +   if (IS_CHERRYVIEW(dev_priv))
> +   ddc_pin = GMBUS_PIN_DPD_CHV;
> +   else
> +   ddc_pin = GMBUS_PIN_DPD;
> +   break;
> +   default:
> +   MISSING_CASE(port);
> +   ddc_pin = GMBUS_PIN_DPB;
> +   break;
> +   }
> +
> +   DRM_DEBUG_KMS("Using DDC pin 0x%x for port %c (platform
> default)\n",
> + ddc_pin, port_name(port));
> +
> +   return ddc_pin;
> +}
> +
>  void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>struct intel_connector *intel_connector)
>  {
> @@ -1808,7 +1852,6 @@ void intel_hdmi_init_connector(struct
> intel_digital_port *intel_dig_port,
> struct drm_device *dev = intel_encoder->base.dev;
> struct drm_i915_private *dev_priv = to_i915(dev);
> enum port port = intel_dig_port->port;
> -   uint8_t alternate_ddc_pin;
>
> DRM_DEBUG_KMS("Adding HDMI connector on port %c\n",
>   port_name(port));
> @@ -1826,12 +1869,10 @@ void intel_hdmi_init_connector(struct
> intel_digital_port *intel_dig_port,
> connector->doublescan_allowed = 0;
> connector->stereo_allowed = 1;
>
> +   intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
> +
> switch (port) {
> case PORT_B:
> -   if (IS_BROXTON(dev_priv))
> -   intel_hdmi->ddc_bus = GMBUS_PIN_1_BXT;
> -   else
> -   intel_hdmi->ddc_bus = GMBUS_PIN_DPB;
> /*
>  * On BXT A0/A1, sw needs to activate DDIA HPD logic and
>  * interrupts to check the external panel connection.
> @@ -1842,46 +1883,17 @@ void intel_hdmi_init_connector(struct
> intel_digital_port *intel_dig_port,
> intel_encoder->hpd_pin = HPD_PORT_B;
> break

Re: [Intel-gfx] [i915] monitor is not detected unless it was active during boot

2016-09-19 Thread Maarten Maathuis
I checked both monitors, on displayport they work, on HDMI they share the
same trouble.

An interesting observation is that when plug the monitor into another
system which has an older nvidia card using nouveau (only HDMI is
available, card is too old for displayport).
It seems that the i2c connection is unreliable, sometimes more or less data
is retrieved, but never all of it seems, and sometimes none.

I wonder if there is some sensitivity to i2c speed.

My general observation of these monitors is that they are slow to turn on
on displayport (locking in a mode takes some time), but on hdmi it is
faster, is there some kind of throttling going on the displayport side that
is being ignored on the HDMI side?

[768542.009520] [drm:drm_edid_block_valid [drm]] *ERROR* EDID checksum is
invalid, remainder is 254
[768542.009561] Raw EDID:
[768542.009575]   00 ff ff ff ff ff ff 00 4c 2d d0 0c 56 53 4d 30
[768542.009593]   20 19 01 03 80 34 1d 78 2a 12 55 a9 54 4d 9f 25
[768542.009610]   0c 50 54 bf ef 80 71 4f 81 00 81 c0 81 80 95 00
[768542.009626]   a9 c0 b3 00 01 01 08 e8 00 30 f2 70 5a 80 b0 58
[768542.009642]   8a 00 09 25 21 00 00 1e 00 00 00 fd 00 18 4b 1e
[768542.009658]   87 3c 00 0a 20 20 20 20 20 20 00 00 00 fc 00 55
[768542.009678]   32 34 45 38 35 30 0a 20 20 20 20 20 00 00 00 ff
[768542.009694]   00 48 54 48 47 38 30 30 30 30 35 0a 20 20 07 ff
[768542.010899] nouveau :01:00.0: DRM: DDC responded, but no EDID for
HDMI-A-1
[768578.474150] [drm:drm_edid_block_valid [drm]] *ERROR* EDID checksum is
invalid, remainder is 157
[768578.474171] Raw EDID:
[768578.474178]   00 ff ff ff ff ff ff 00 4c 2d d0 0c 56 53 4d 30
[768578.474187]   20 19 01 03 80 34 1d 78 2a 12 55 a9 54 4d 9f 25
[768578.474195]   0c 50 54 bf ef ff ff ff ff ff ff ff ff ff ff ff
[768578.474202]   ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[768578.474210]   ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[768578.474218]   ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[768578.474225]   ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[768578.474233]   ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[768578.475264] nouveau :01:00.0: DRM: DDC responded, but no EDID for
HDMI-A-1
[768590.904774] [drm:drm_edid_block_valid [drm]] *ERROR* EDID checksum is
invalid, remainder is 181
[768590.904813] Raw EDID:
[768590.904826]   00 ff ff ff ff ff ff 00 4c 2d d0 0c 56 53 4d 30
[768590.904843]   20 19 01 03 80 34 1d 78 2a 12 55 a9 54 4d 9f 25
[768590.904860]   0c 50 54 bf ef 80 71 4f 81 00 81 c0 81 80 95 00
[768590.904876]   a9 c0 b3 00 01 01 08 e8 00 30 f2 70 5a 80 b0 58
[768590.904892]   8a 00 09 25 21 00 00 1e 00 00 00 fd 00 18 4b 1e
[768590.904908]   87 3c 00 0a 20 20 20 20 20 20 00 00 00 fc 00 55
[768590.904924]   32 34 45 38 35 30 0a 20 20 20 20 20 00 00 00 ff
[768590.904940]   00 48 54 48 47 38 30 30 30 30 35 0b ff ff ff ff
[768590.906012] nouveau :01:00.0: DRM: DDC responded, but no EDID for
HDMI-A-1

On Mon, Sep 19, 2016 at 9:50 PM, Maarten Maathuis <madman2...@gmail.com>
wrote:

> The previous messages are about using the HDMI connection of my monitor on
> the HDMI 2.0->DP bridge (whatever the formal name may be) of my motherboard,
>
> Using the HDMI 1.4 connection of my motherboard:
>
> [   55.744581] [drm:intel_get_hpd_pins] hotplug event received, stat
> 0x0040, dig 0x10101210, pins 0x0040
> [   55.744589] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on
> PIN 6 - cnt: 0
> [   55.744620] [drm:i915_hotplug_work_func] running encoder hotplug
> functions
> [   55.744625] [drm:i915_hotplug_work_func] Connector HDMI-A-2 (pin 6)
> received hotplug event.
> [   55.744629] [drm:intel_hdmi_detect] [CONNECTOR:46:HDMI-A-2]
> [   55.744915] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr:
> 0050 w(1)
> [   55.744922] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK on first
> message, retry
> [   55.745190] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr:
> 0050 w(1)
> [   55.745199] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent
> adapter i915 gmbus dpc
> [   55.745469] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr:
> 0040 w(1)
> [   55.745476] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK on first
> message, retry
> [   55.745744] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr:
> 0040 w(1)
>
> As for my OS, i run archlinux:
> Linux main 4.7.4-1-ARCH #1 SMP PREEMPT Thu Sep 15 15:24:29 CEST 2016
> x86_64 GNU/Linux
>
> The requested VBT information is somewhere in here, I couldn't filter it
> since i couldn't see an end marker:
>
> [2.394379] [drm:intel_detect_pch] Found SunrisePoint PCH
> [2.394380] [drm:get_allowed_dc_mask] Allowed DC state mask 03
> [2.394768] [drm:i915_dump_device_info] i915 device info: gen=9,
> pciid=0x1912 rev=0x06 flags=need_gfx_hws,is_skylake,
> has_fbc,has_hotplug,has_llc,has_ddi,has_fpga_dbg,
> [  

Re: [Intel-gfx] [i915] monitor is not detected unless it was active during boot

2016-09-19 Thread Maarten Maathuis
46] [drm:drm_mode_debug_printmodeline] Modeline 97:"800x600" 75
49500 800 816 896 1056 600 601 604 625 0x40 0x5
[2.852251] [drm:drm_mode_debug_printmodeline] Modeline 98:"800x600" 72
5 800 856 976 1040 600 637 643 666 0x40 0x5
[2.852255] [drm:drm_mode_debug_printmodeline] Modeline 85:"800x600" 60
4 800 840 968 1056 600 601 605 628 0x40 0x5
[2.852260] [drm:drm_mode_debug_printmodeline] Modeline 86:"800x600" 56
36000 800 824 896 1024 600 601 603 625 0x40 0x5
[2.852265] [drm:drm_mode_debug_printmodeline] Modeline 100:"720x576" 50
27000 720 732 796 864 576 581 586 625 0x40 0xa
[2.852270] [drm:drm_mode_debug_printmodeline] Modeline 114:"720x480" 60
27027 720 736 798 858 480 489 495 525 0x40 0xa
[2.852274] [drm:drm_mode_debug_printmodeline] Modeline 101:"720x480" 60
27000 720 736 798 858 480 489 495 525 0x40 0xa
[2.852279] [drm:drm_mode_debug_printmodeline] Modeline 87:"640x480" 75
31500 640 656 720 840 480 481 484 500 0x40 0xa
[2.852284] [drm:drm_mode_debug_printmodeline] Modeline 88:"640x480" 73
31500 640 664 704 832 480 489 492 520 0x40 0xa
[2.852288] [drm:drm_mode_debug_printmodeline] Modeline 89:"640x480" 67
30240 640 704 768 864 480 483 486 525 0x40 0xa
[2.852293] [drm:drm_mode_debug_printmodeline] Modeline 113:"640x480" 60
25200 640 656 752 800 480 490 492 525 0x40 0xa
[2.852298] [drm:drm_mode_debug_printmodeline] Modeline 90:"640x480" 60
25175 640 656 752 800 480 490 492 525 0x40 0xa
[2.852303] [drm:drm_mode_debug_printmodeline] Modeline 91:"720x400" 70
28320 720 738 846 900 400 412 414 449 0x40 0x6
[2.852306] [drm:drm_helper_probe_single_connector_modes]
[CONNECTOR:52:HDMI-A-3]
[2.852310] [drm:intel_hdmi_detect] [CONNECTOR:52:HDMI-A-3]
[2.852571] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpd] NAK for addr:
0050 w(1)
[2.852578] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpd] NAK on first
message, retry
[2.852916] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpd] NAK for addr:
0050 w(1)
[2.852927] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent
adapter i915 gmbus dpd
[2.853240] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpd] NAK for addr:
0040 w(1)
[2.853243] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpd] NAK on first
message, retry
[2.853543] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpd] NAK for addr:
0040 w(1)
[2.853552] [drm:drm_helper_probe_single_connector_modes]
[CONNECTOR:52:HDMI-A-3] status updated from unknown to disconnected
[2.853556] [drm:drm_helper_probe_single_connector_modes]
[CONNECTOR:52:HDMI-A-3] disconnected
[2.853567] [drm:drm_setup_crtcs]
[2.853575] [drm:drm_enable_connectors] connector 37 enabled? yes
[2.853578] [drm:drm_enable_connectors] connector 43 enabled? no
[2.853582] [drm:drm_enable_connectors] connector 46 enabled? no
[2.853585] [drm:drm_enable_connectors] connector 48 enabled? yes
[2.853588] [drm:drm_enable_connectors] connector 52 enabled? no
[2.853596] [drm:intel_fb_initial_config] looking for cmdline mode on
connector DP-1
[2.853599] [drm:intel_fb_initial_config] looking for preferred mode on
connector DP-1 0
[2.853607] [drm:intel_fb_initial_config] connector DP-1 on pipe A
[CRTC:26]: 3840x2160
[2.853612] [drm:intel_fb_initial_config] connector HDMI-A-1 not
enabled, skipping
[2.853617] [drm:intel_fb_initial_config] connector HDMI-A-2 not
enabled, skipping
[2.853622] [drm:intel_fb_initial_config] looking for cmdline mode on
connector DP-2
[2.853626] [drm:intel_fb_initial_config] looking for preferred mode on
connector DP-2 0
[2.853729] [drm:intel_fb_initial_config] connector DP-2 on pipe B
[CRTC:30]: 3840x2160
[2.853733] [drm:intel_fb_initial_config] connector HDMI-A-3 not
enabled, skipping
[2.853738] [drm:drm_setup_crtcs] desired mode 3840x2160 set on crtc 26
(0,0)
[2.853742] [drm] Initialized i915 1.6.0 20160425 for :00:02.0 on
minor 0

On Mon, Sep 19, 2016 at 8:46 PM, Maarten Maathuis <madman2...@gmail.com>
wrote:

> And the normal output at bootup:
>
> [2.826131] [drm:drm_helper_probe_single_connector_modes]
> [CONNECTOR:48:DP-2]
> [2.826135] [drm:intel_dp_detect] [CONNECTOR:48:DP-2]
> [2.826645] [drm:intel_dp_get_dpcd] DPCD: 12 14 c4 01 01 15 00 01 00 00
> 04 00 0f 00 00
> [2.827032] [drm:intel_dp_get_dpcd] Display Port TPS3 support: source
> yes, sink yes
> [2.827038] [drm:intel_dp_print_rates] source rates: 162000, 216000,
> 27, 324000, 432000, 54
> [2.827043] [drm:intel_dp_print_rates] sink rates: 162000, 27,
> 54
> [2.827047] [drm:intel_dp_print_rates] common rates: 162000, 27,
> 54
> [2.827905] [drm:intel_dp_probe_mst] Sink is not MST capable
> [2.828350] [drm:drm_dp_i2c_do_msg] native defer
> [2.829760] [drm:drm_dp_i2c_do_msg] native defer
> [2.831102] [d

Re: [Intel-gfx] [i915] monitor is not detected unless it was active during boot

2016-09-19 Thread Maarten Maathuis
0 900 901 904 1000 0x40 0x5
[2.870360] [drm:drm_mode_debug_printmodeline] Modeline 92:"1280x1024"
75 135000 1280 1296 1440 1688 1024 1025 1028 1066 0x40 0x5
[2.870365] [drm:drm_mode_debug_printmodeline] Modeline 81:"1280x1024"
60 108000 1280 1328 1440 1688 1024 1025 1028 1066 0x40 0x5
[2.870370] [drm:drm_mode_debug_printmodeline] Modeline 82:"1440x900" 60
88750 1440 1488 1520 1600 900 903 909 926 0x40 0x9
[2.870375] [drm:drm_mode_debug_printmodeline] Modeline 80:"1280x800" 60
71000 1280 1328 1360 1440 800 803 809 823 0x40 0x9
[2.870380] [drm:drm_mode_debug_printmodeline] Modeline 79:"1152x864" 75
108000 1152 1216 1344 1600 864 865 868 900 0x40 0x5
[2.870384] [drm:drm_mode_debug_printmodeline] Modeline 77:"1280x720" 60
74250 1280 1390 1430 1650 720 725 730 750 0x40 0x5
[2.870389] [drm:drm_mode_debug_printmodeline] Modeline 112:"1280x720"
60 74176 1280 1390 1430 1650 720 725 730 750 0x40 0x5
[2.870394] [drm:drm_mode_debug_printmodeline] Modeline 102:"1280x720"
50 74250 1280 1720 1760 1980 720 725 730 750 0x40 0x5
[2.870399] [drm:drm_mode_debug_printmodeline] Modeline 93:"1024x768" 75
78750 1024 1040 1136 1312 768 769 772 800 0x40 0x5
[2.870404] [drm:drm_mode_debug_printmodeline] Modeline 94:"1024x768" 70
75000 1024 1048 1184 1328 768 771 777 806 0x40 0xa
[2.870408] [drm:drm_mode_debug_printmodeline] Modeline 95:"1024x768" 60
65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa
[2.870413] [drm:drm_mode_debug_printmodeline] Modeline 96:"832x624" 75
57284 832 864 928 1152 624 625 628 667 0x40 0xa
[2.870418] [drm:drm_mode_debug_printmodeline] Modeline 97:"800x600" 75
49500 800 816 896 1056 600 601 604 625 0x40 0x5
[2.870423] [drm:drm_mode_debug_printmodeline] Modeline 98:"800x600" 72
5 800 856 976 1040 600 637 643 666 0x40 0x5
[2.870428] [drm:drm_mode_debug_printmodeline] Modeline 85:"800x600" 60
4 800 840 968 1056 600 601 605 628 0x40 0x5
[2.870433] [drm:drm_mode_debug_printmodeline] Modeline 86:"800x600" 56
36000 800 824 896 1024 600 601 603 625 0x40 0x5
[2.870437] [drm:drm_mode_debug_printmodeline] Modeline 100:"720x576" 50
27000 720 732 796 864 576 581 586 625 0x40 0xa
[2.870442] [drm:drm_mode_debug_printmodeline] Modeline 114:"720x480" 60
27027 720 736 798 858 480 489 495 525 0x40 0xa
[2.870447] [drm:drm_mode_debug_printmodeline] Modeline 101:"720x480" 60
27000 720 736 798 858 480 489 495 525 0x40 0xa
[2.870452] [drm:drm_mode_debug_printmodeline] Modeline 87:"640x480" 75
31500 640 656 720 840 480 481 484 500 0x40 0xa
[2.870456] [drm:drm_mode_debug_printmodeline] Modeline 88:"640x480" 73
31500 640 664 704 832 480 489 492 520 0x40 0xa
[2.870461] [drm:drm_mode_debug_printmodeline] Modeline 89:"640x480" 67
30240 640 704 768 864 480 483 486 525 0x40 0xa
[2.870466] [drm:drm_mode_debug_printmodeline] Modeline 113:"640x480" 60
25200 640 656 752 800 480 490 492 525 0x40 0xa
[2.870471] [drm:drm_mode_debug_printmodeline] Modeline 90:"640x480" 60
25175 640 656 752 800 480 490 492 525 0x40 0xa
[2.870475] [drm:drm_mode_debug_printmodeline] Modeline 91:"720x400" 70
28320 720 738 846 900 400 412 414 449 0x40 0x6


On Mon, Sep 19, 2016 at 8:39 PM, Maarten Maathuis <madman2...@gmail.com>
wrote:

> Hi,
>
> I have a monitor, that when connected a skylake system, doesn't ever come
> up when hotplugging or after resume. The "bios" seems to not have problems
> bringing it up, even at the native 3840x2160 resolution, and when it works,
> all modes are correctly read (checked via xrandr).
>
> I tried both the HMDI 1.4 port, as well as the DP 1.2 -> HDMI 2.0 built in
> conversion chip.
>
> This is the dmesg output I have when plugging in this monitor, the DP-2
> connector is the one that should be detected.
>
> Any advice on how to proceed?
>
> Please be aware I am not subscribed to this mailing list, so please reply
> to me directly as well.
>
> Maarten.
>
> [ 1634.666165] [drm:intel_get_hpd_pins] hotplug event received, stat
> 0x0080, dig 0x10121010, pins 0x0080
> [ 1634.666179] [drm:intel_hpd_irq_handler] digital hpd port D - long
> [ 1634.666183] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on
> PIN 7 - cnt: 0
> [ 1634.666229] [drm:intel_dp_hpd_pulse] got hpd irq on port D - long
> [ 1634.666253] [drm:i915_hotplug_work_func] running encoder hotplug
> functions
> [ 1634.666258] [drm:i915_hotplug_work_func] Connector DP-2 (pin 7)
> received hotplug event.
> [ 1634.666261] [drm:intel_dp_detect] [CONNECTOR:48:DP-2]
> [ 1634.666273] [drm:i915_hotplug_work_func] Connector HDMI-A-3 (pin 7)
> received hotplug event.
> [ 1634.666284] [drm:intel_hdmi_detect

[Intel-gfx] [i915] monitor is not detected unless it was active during boot

2016-09-19 Thread Maarten Maathuis
Hi,

I have a monitor, that when connected a skylake system, doesn't ever come
up when hotplugging or after resume. The "bios" seems to not have problems
bringing it up, even at the native 3840x2160 resolution, and when it works,
all modes are correctly read (checked via xrandr).

I tried both the HMDI 1.4 port, as well as the DP 1.2 -> HDMI 2.0 built in
conversion chip.

This is the dmesg output I have when plugging in this monitor, the DP-2
connector is the one that should be detected.

Any advice on how to proceed?

Please be aware I am not subscribed to this mailing list, so please reply
to me directly as well.

Maarten.

[ 1634.666165] [drm:intel_get_hpd_pins] hotplug event received, stat
0x0080, dig 0x10121010, pins 0x0080
[ 1634.666179] [drm:intel_hpd_irq_handler] digital hpd port D - long
[ 1634.666183] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on
PIN 7 - cnt: 0
[ 1634.666229] [drm:intel_dp_hpd_pulse] got hpd irq on port D - long
[ 1634.666253] [drm:i915_hotplug_work_func] running encoder hotplug
functions
[ 1634.666258] [drm:i915_hotplug_work_func] Connector DP-2 (pin 7) received
hotplug event.
[ 1634.666261] [drm:intel_dp_detect] [CONNECTOR:48:DP-2]
[ 1634.666273] [drm:i915_hotplug_work_func] Connector HDMI-A-3 (pin 7)
received hotplug event.
[ 1634.666284] [drm:intel_hdmi_detect] [CONNECTOR:52:HDMI-A-3]
[ 1634.769941] [drm:intel_hdmi_detect] HDMI live status down
[ 1640.748356] [drm:intel_get_hpd_pins] hotplug event received, stat
0x0080, dig 0x10121010, pins 0x0080
[ 1640.748369] [drm:intel_hpd_irq_handler] digital hpd port D - long
[ 1640.748373] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on
PIN 7 - cnt: 0
[ 1640.748416] [drm:intel_dp_hpd_pulse] got hpd irq on port D - long
[ 1640.756938] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.765400] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.773936] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.782410] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.790910] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.799389] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.807907] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.816409] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.824895] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.833427] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.841915] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.850426] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.858919] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.867423] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.875924] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.884424] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.892899] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.901454] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.910008] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.918494] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.926994] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.935486] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.943982] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.952461] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.960971] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.969459] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.978003] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.986482] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1640.994973] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.003497] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.011986] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.020504] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.020506] [drm:drm_dp_dpcd_access] too many retries, giving up
[ 1641.020528] [drm:i915_hotplug_work_func] running encoder hotplug
functions
[ 1641.020529] [drm:i915_hotplug_work_func] Connector DP-2 (pin 7) received
hotplug event.
[ 1641.020530] [drm:intel_dp_detect] [CONNECTOR:48:DP-2]
[ 1641.029054] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.037563] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.046092] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.054583] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.063076] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.071567] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.080094] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.088568] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d40001f
[ 1641.097054] 

[Intel-gfx] Hardlock problems when switching monitor channels and questions (Skylake)

2015-11-02 Thread Maarten Maathuis
Hi everyone.

I've been some hardlock problems when switching from the HDMI connection of
my monitor (connected to another PC) and the displayport (connected to the
problematic PC), several times a week at least.

In an effort to narrow down the problem I've been tried looking at drm
modeset debug information, as well try catch something with netconsole.
Neither have pointed me the root cause yet, but i do have some observations
that I cannot put into place yet and would like some feedback on prior to
opening a bug report.

My mainbord is: Asrock Fatal1ty Z170 Gaming-ITX/ac
My CPU is: Intel i7 6700
My monitor is: Samsung U24E850, equiped with both displayport 1.2 and HDMI
2.0

Kernel version: 4.3-RC7

The display connections on the mainbord are:
- DP 1.2
- HDMI 1.4
- HDMI 2.0 via DP 1.2 (recognized as DP by driver)

I notice some funny things I would like some feedback on.

1. The EDID retrieval doesn't always succeed, i've noticed this sometimes
by running "xrandr" after starting up. I've also noticed it after rebooting
from a hard lock that it goes into 1024x768 resolution instead of
3840x2160, it takes another reboot to get it right. As if it relies on the
resolution the boot used? How to troubleshoot this?

2. I notice that the driver thinks there are 3 HDMI connections, 2 of which
seem to share the same hotplug pin as the 2 DP connections, what is going
here? Could this cause trouble? The fake HDMI connections seem always to
fail edid retrieval, but I'm not a 100% sure if this also happens in the
hardlock situation (no evidence yet).

3. Switching between HDMI and DP channel on my monitor sometimes results in
a hotplug event and sometimes it does not? Any idea why this happens? I'm
curious about this because the hardlocks occur after spending a few hours
on the HDMI channel typically.

Anything I should be looking for before going down the route of a bug
report?

Sincerely,

Maarten.

P.S. I'm not subscribed to this mailinglist, so please CC me.

-- 
Far away from the primal instinct, the song seems to fade away, the river
get wider between your thoughts and the things we do and say.
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx