From: Jani Nikula <jani.nikula@linux.intel.com>
To: Lyude Paul <lyude@redhat.com>, intel-gfx@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Lee Shawn C <shawn.c.lee@intel.com>
Subject: Re: [PATCH 5/5] drm/i915: Force DPCD backlight mode on X1 Extreme 2nd Gen 4K AMOLED panel
Date: Tue, 03 Dec 2019 14:42:17 +0200 [thread overview]
Message-ID: <87lfrtinrq.fsf@intel.com> (raw)
In-Reply-To: <20191122231616.2574-6-lyude@redhat.com>
On Fri, 22 Nov 2019, Lyude Paul <lyude@redhat.com> wrote:
> Annoyingly, the VBT on the ThinkPad X1 Extreme 2nd Gen indicates that
> the system uses plain PWM based backlight controls, when in reality the
> only backlight controls that work are the standard VESA eDP DPCD
> backlight controls.
>
> Honestly, this makes me wonder how many other systems have these issues
> or lie about this in their VBT. Not sure we have any good way of finding
> out until panels like this become more common place in the laptop
> market. For now, just add a DRM DP quirk to indicate that this panel is
> telling the truth and is being a good LCD.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112376
> Signed-off-by: Lyude Paul <lyude@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/drm_dp_helper.c | 4 ++++
> drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 10 ++++++++--
> include/drm/drm_dp_helper.h | 8 ++++++++
> 3 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> index 2c7870aef469..ec7061e3a99b 100644
> --- a/drivers/gpu/drm/drm_dp_helper.c
> +++ b/drivers/gpu/drm/drm_dp_helper.c
> @@ -1155,6 +1155,10 @@ static const struct dpcd_quirk dpcd_quirk_list[] = {
> { OUI(0x00, 0x10, 0xfa), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_NO_PSR) },
> /* CH7511 seems to leave SINK_COUNT zeroed */
> { OUI(0x00, 0x00, 0x00), DEVICE_ID('C', 'H', '7', '5', '1', '1'), false, BIT(DP_DPCD_QUIRK_NO_SINK_COUNT) },
> + /* Optional 4K AMOLED panel in the ThinkPad X1 Extreme 2nd Generation
> + * only supports DPCD backlight controls, despite advertising otherwise
> + */
> + { OUI(0xba, 0x41, 0x59), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT) },
> };
>
> #undef OUI
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> index 87b59db9ffe3..3d61260b08ad 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -325,11 +325,17 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)
> int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector)
> {
> struct intel_panel *panel = &intel_connector->panel;
> - struct drm_i915_private *dev_priv = to_i915(intel_connector->base.dev);
> + struct intel_dp *intel_dp =
> + enc_to_intel_dp(&intel_connector->encoder->base);
> + struct drm_i915_private *dev_priv =
> + to_i915(intel_connector->base.dev);
>
> if (i915_modparams.enable_dpcd_backlight == 0 ||
> (i915_modparams.enable_dpcd_backlight == -1 &&
> - dev_priv->vbt.backlight.type != INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE))
> + dev_priv->vbt.backlight.type !=
> + INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE &&
> + !drm_dp_has_quirk(&intel_dp->desc,
> + DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT)))
> return -ENODEV;
>
> if (!intel_dp_aux_display_control_capable(intel_connector))
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index 51ecb5112ef8..a444209cd54b 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -1520,6 +1520,14 @@ enum drm_dp_quirk {
> * The driver should ignore SINK_COUNT during detection.
> */
> DP_DPCD_QUIRK_NO_SINK_COUNT,
> + /**
> + * @DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT:
> + *
> + * The device is telling the truth when it says that it uses DPCD
> + * backlight controls, even if the system's firmware disagrees.
> + * The driver should honor the DPCD backlight capabilities advertised.
> + */
> + DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT,
> };
>
> /**
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Lyude Paul <lyude@redhat.com>, intel-gfx@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org, Maxime Ripard <mripard@kernel.org>,
dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 5/5] drm/i915: Force DPCD backlight mode on X1 Extreme 2nd Gen 4K AMOLED panel
Date: Tue, 03 Dec 2019 14:42:17 +0200 [thread overview]
Message-ID: <87lfrtinrq.fsf@intel.com> (raw)
In-Reply-To: <20191122231616.2574-6-lyude@redhat.com>
On Fri, 22 Nov 2019, Lyude Paul <lyude@redhat.com> wrote:
> Annoyingly, the VBT on the ThinkPad X1 Extreme 2nd Gen indicates that
> the system uses plain PWM based backlight controls, when in reality the
> only backlight controls that work are the standard VESA eDP DPCD
> backlight controls.
>
> Honestly, this makes me wonder how many other systems have these issues
> or lie about this in their VBT. Not sure we have any good way of finding
> out until panels like this become more common place in the laptop
> market. For now, just add a DRM DP quirk to indicate that this panel is
> telling the truth and is being a good LCD.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112376
> Signed-off-by: Lyude Paul <lyude@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/drm_dp_helper.c | 4 ++++
> drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 10 ++++++++--
> include/drm/drm_dp_helper.h | 8 ++++++++
> 3 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> index 2c7870aef469..ec7061e3a99b 100644
> --- a/drivers/gpu/drm/drm_dp_helper.c
> +++ b/drivers/gpu/drm/drm_dp_helper.c
> @@ -1155,6 +1155,10 @@ static const struct dpcd_quirk dpcd_quirk_list[] = {
> { OUI(0x00, 0x10, 0xfa), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_NO_PSR) },
> /* CH7511 seems to leave SINK_COUNT zeroed */
> { OUI(0x00, 0x00, 0x00), DEVICE_ID('C', 'H', '7', '5', '1', '1'), false, BIT(DP_DPCD_QUIRK_NO_SINK_COUNT) },
> + /* Optional 4K AMOLED panel in the ThinkPad X1 Extreme 2nd Generation
> + * only supports DPCD backlight controls, despite advertising otherwise
> + */
> + { OUI(0xba, 0x41, 0x59), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT) },
> };
>
> #undef OUI
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> index 87b59db9ffe3..3d61260b08ad 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -325,11 +325,17 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)
> int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector)
> {
> struct intel_panel *panel = &intel_connector->panel;
> - struct drm_i915_private *dev_priv = to_i915(intel_connector->base.dev);
> + struct intel_dp *intel_dp =
> + enc_to_intel_dp(&intel_connector->encoder->base);
> + struct drm_i915_private *dev_priv =
> + to_i915(intel_connector->base.dev);
>
> if (i915_modparams.enable_dpcd_backlight == 0 ||
> (i915_modparams.enable_dpcd_backlight == -1 &&
> - dev_priv->vbt.backlight.type != INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE))
> + dev_priv->vbt.backlight.type !=
> + INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE &&
> + !drm_dp_has_quirk(&intel_dp->desc,
> + DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT)))
> return -ENODEV;
>
> if (!intel_dp_aux_display_control_capable(intel_connector))
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index 51ecb5112ef8..a444209cd54b 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -1520,6 +1520,14 @@ enum drm_dp_quirk {
> * The driver should ignore SINK_COUNT during detection.
> */
> DP_DPCD_QUIRK_NO_SINK_COUNT,
> + /**
> + * @DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT:
> + *
> + * The device is telling the truth when it says that it uses DPCD
> + * backlight controls, even if the system's firmware disagrees.
> + * The driver should honor the DPCD backlight capabilities advertised.
> + */
> + DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT,
> };
>
> /**
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Lyude Paul <lyude@redhat.com>, intel-gfx@lists.freedesktop.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Chris Wilson <chris@chris-wilson.co.uk>,
Lee Shawn C <shawn.c.lee@intel.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] drm/i915: Force DPCD backlight mode on X1 Extreme 2nd Gen 4K AMOLED panel
Date: Tue, 03 Dec 2019 14:42:17 +0200 [thread overview]
Message-ID: <87lfrtinrq.fsf@intel.com> (raw)
In-Reply-To: <20191122231616.2574-6-lyude@redhat.com>
On Fri, 22 Nov 2019, Lyude Paul <lyude@redhat.com> wrote:
> Annoyingly, the VBT on the ThinkPad X1 Extreme 2nd Gen indicates that
> the system uses plain PWM based backlight controls, when in reality the
> only backlight controls that work are the standard VESA eDP DPCD
> backlight controls.
>
> Honestly, this makes me wonder how many other systems have these issues
> or lie about this in their VBT. Not sure we have any good way of finding
> out until panels like this become more common place in the laptop
> market. For now, just add a DRM DP quirk to indicate that this panel is
> telling the truth and is being a good LCD.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112376
> Signed-off-by: Lyude Paul <lyude@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/drm_dp_helper.c | 4 ++++
> drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 10 ++++++++--
> include/drm/drm_dp_helper.h | 8 ++++++++
> 3 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> index 2c7870aef469..ec7061e3a99b 100644
> --- a/drivers/gpu/drm/drm_dp_helper.c
> +++ b/drivers/gpu/drm/drm_dp_helper.c
> @@ -1155,6 +1155,10 @@ static const struct dpcd_quirk dpcd_quirk_list[] = {
> { OUI(0x00, 0x10, 0xfa), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_NO_PSR) },
> /* CH7511 seems to leave SINK_COUNT zeroed */
> { OUI(0x00, 0x00, 0x00), DEVICE_ID('C', 'H', '7', '5', '1', '1'), false, BIT(DP_DPCD_QUIRK_NO_SINK_COUNT) },
> + /* Optional 4K AMOLED panel in the ThinkPad X1 Extreme 2nd Generation
> + * only supports DPCD backlight controls, despite advertising otherwise
> + */
> + { OUI(0xba, 0x41, 0x59), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT) },
> };
>
> #undef OUI
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> index 87b59db9ffe3..3d61260b08ad 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -325,11 +325,17 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)
> int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector)
> {
> struct intel_panel *panel = &intel_connector->panel;
> - struct drm_i915_private *dev_priv = to_i915(intel_connector->base.dev);
> + struct intel_dp *intel_dp =
> + enc_to_intel_dp(&intel_connector->encoder->base);
> + struct drm_i915_private *dev_priv =
> + to_i915(intel_connector->base.dev);
>
> if (i915_modparams.enable_dpcd_backlight == 0 ||
> (i915_modparams.enable_dpcd_backlight == -1 &&
> - dev_priv->vbt.backlight.type != INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE))
> + dev_priv->vbt.backlight.type !=
> + INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE &&
> + !drm_dp_has_quirk(&intel_dp->desc,
> + DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT)))
> return -ENODEV;
>
> if (!intel_dp_aux_display_control_capable(intel_connector))
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index 51ecb5112ef8..a444209cd54b 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -1520,6 +1520,14 @@ enum drm_dp_quirk {
> * The driver should ignore SINK_COUNT during detection.
> */
> DP_DPCD_QUIRK_NO_SINK_COUNT,
> + /**
> + * @DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT:
> + *
> + * The device is telling the truth when it says that it uses DPCD
> + * backlight controls, even if the system's firmware disagrees.
> + * The driver should honor the DPCD backlight capabilities advertised.
> + */
> + DP_DPCD_QUIRK_FORCE_DPCD_BACKLIGHT,
> };
>
> /**
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2019-12-03 12:42 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-22 23:15 [PATCH 0/5] drm/i915: eDP DPCD aux backlight fixes Lyude Paul
2019-11-22 23:15 ` [Intel-gfx] " Lyude Paul
2019-11-22 23:15 ` Lyude Paul
2019-11-22 23:15 ` [PATCH 1/5] drm/i915: Fix eDP DPCD aux max backlight calculations Lyude Paul
2019-11-22 23:15 ` Lyude Paul
2019-11-22 23:15 ` [Intel-gfx] " Lyude Paul
2019-12-20 10:05 ` [1/5] " Perr Yuan
2019-12-20 10:05 ` Perr Yuan
2019-12-20 10:05 ` [Intel-gfx] " Perr Yuan
2019-11-22 23:16 ` [PATCH 2/5] drm/i915: Assume 100% brightness when not in DPCD control mode Lyude Paul
2019-11-22 23:16 ` Lyude Paul
2019-11-22 23:16 ` [Intel-gfx] " Lyude Paul
2019-11-22 23:16 ` Lyude Paul
2019-12-03 12:40 ` Jani Nikula
2019-12-03 12:40 ` Jani Nikula
2019-12-03 12:40 ` [Intel-gfx] " Jani Nikula
2019-12-03 22:42 ` [PATCH v2] " Lyude Paul
2019-12-03 22:42 ` Lyude Paul
2019-12-03 22:42 ` [Intel-gfx] " Lyude Paul
2019-12-23 7:17 ` [v2] " Perr Yuan
2019-12-23 7:17 ` Perr Yuan
2019-12-23 7:17 ` [Intel-gfx] " Perr Yuan
2019-11-22 23:16 ` [PATCH 3/5] drm/i915: Fix DPCD register order in intel_dp_aux_enable_backlight() Lyude Paul
2019-11-22 23:16 ` [Intel-gfx] " Lyude Paul
2019-11-22 23:16 ` Lyude Paul
2019-12-03 12:41 ` Jani Nikula
2019-12-03 12:41 ` Jani Nikula
2019-12-03 12:41 ` [Intel-gfx] " Jani Nikula
2019-12-23 7:19 ` [3/5] " Perr Yuan
2019-12-23 7:19 ` Perr Yuan
2019-12-23 7:19 ` [Intel-gfx] " Perr Yuan
2019-11-22 23:16 ` [PATCH 4/5] drm/i915: Auto detect DPCD backlight support by default Lyude Paul
2019-11-22 23:16 ` Lyude Paul
2019-11-22 23:16 ` [Intel-gfx] " Lyude Paul
2019-12-03 12:41 ` Jani Nikula
2019-12-03 12:41 ` Jani Nikula
2019-12-03 12:41 ` [Intel-gfx] " Jani Nikula
2019-12-23 7:20 ` [4/5] " Perr Yuan
2019-12-23 7:20 ` Perr Yuan
2019-12-23 7:20 ` [Intel-gfx] " Perr Yuan
2019-11-22 23:16 ` [PATCH 5/5] drm/i915: Force DPCD backlight mode on X1 Extreme 2nd Gen 4K AMOLED panel Lyude Paul
2019-11-22 23:16 ` Lyude Paul
2019-11-22 23:16 ` [Intel-gfx] " Lyude Paul
2019-11-22 23:16 ` Lyude Paul
2019-12-03 12:42 ` Jani Nikula [this message]
2019-12-03 12:42 ` Jani Nikula
2019-12-03 12:42 ` [Intel-gfx] " Jani Nikula
2019-11-22 23:55 ` ✓ Fi.CI.BAT: success for drm/i915: eDP DPCD aux backlight fixes Patchwork
2019-11-22 23:55 ` [Intel-gfx] " Patchwork
2019-11-24 6:16 ` ✓ Fi.CI.IGT: " Patchwork
2019-11-24 6:16 ` [Intel-gfx] " Patchwork
2019-12-04 1:05 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: eDP DPCD aux backlight fixes (rev2) Patchwork
2019-12-04 13:07 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2019-12-05 1:13 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: eDP DPCD aux backlight fixes (rev3) Patchwork
2019-12-05 7:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: eDP DPCD aux backlight fixes (rev4) Patchwork
-- strict thread matches above, loose matches on Subject: below --
2019-12-12 3:15 [PATCH 5/5] drm/i915: Force DPCD backlight mode on X1 Extreme 2nd Gen 4K AMOLED panel AceLan Kao
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=87lfrtinrq.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=rodrigo.vivi@intel.com \
--cc=shawn.c.lee@intel.com \
/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.