Re: [PATCH v3 28/54] dyndbg: restore classmap protection when theres a controlling_param

2025-06-21 Thread Sean Paul
On Thu, Apr 3, 2025 at 9:48 AM Jim Cromie wrote: > \snip > > -static void ddebug_match_apply_kparam(const struct kernel_param *kp, > - const struct _ddebug_class_map *map, > - const char *mod_name) > +static struct _ddebug_c

Re: [Freedreno] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Sean Paul
On Thu, Jul 13, 2023 at 9:04 AM Uwe Kleine-König wrote: > > hello Sean, > > On Wed, Jul 12, 2023 at 02:31:02PM -0400, Sean Paul wrote: > > I'd really prefer this patch (series or single) is not accepted. This > > will cause problems for everyone cherry-picking patch

Re: [Freedreno] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-12 Thread Sean Paul
On Wed, Jul 12, 2023 at 10:52 AM Jani Nikula wrote: > > On Wed, 12 Jul 2023, Uwe Kleine-König wrote: > > Hello, > > > > while I debugged an issue in the imx-lcdc driver I was constantly > > irritated about struct drm_device pointer variables being named "dev" > > because with that name I usually

[PATCH] drm/amd: Re-classify some log messages in commit path

2022-03-24 Thread Sean Paul
From: Sean Paul ATOMIC and DRIVER log categories do not typically contain per-frame log messages. This patch re-classifies some messages in amd to chattier categories to keep ATOMIC/DRIVER quiet. Signed-off-by: Sean Paul --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 +++-- drivers

[PATCH v2] drm/amdgpu: Add support for drm_privacy_screen

2022-03-09 Thread Sean Paul
From: Sean Paul This patch adds the necessary hooks to make amdgpu aware of privacy screens. On devices with privacy screen drivers (such as thinkpad-acpi), the amdgpu driver will defer probe until it's ready and then sync the sw and hw state on each commit the connector is involved and en

[PATCH] drm/amdgpu: Add support for drm_privacy_screen

2022-03-08 Thread Sean Paul
From: Sean Paul This patch adds the necessary hooks to make amdgpu aware of privacy screens. On devices with privacy screen drivers (such as thinkpad-acpi), the amdgpu driver will defer probe until it's ready and then sync the sw and hw state on each commit the connector is involved and en

Re: [Intel-gfx] [PATCH 1/2] drm: Add Gamma and Degamma LUT sizes props to drm_crtc to validate.

2021-10-25 Thread Sean Paul
; DRM_COLOR_LUT_NON_DECREASING = BIT(1), > }; > > -int drm_color_lut_check(const struct drm_property_blob *lut, u32 tests); > +int drm_color_lut_channels_check(const struct drm_property_blob *lut, > + u32 tests); > #endif > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h > index 2deb15d7e1610..cabd3ef1a6e32 100644 > --- a/include/drm/drm_crtc.h > +++ b/include/drm/drm_crtc.h > @@ -1072,6 +1072,17 @@ struct drm_crtc { > /** @funcs: CRTC control functions */ > const struct drm_crtc_funcs *funcs; > > + /** > + * @degamma_lut_size: Size of degamma LUT. > + */ > + uint32_t degamma_lut_size; > + > + /** > + * @gamma_lut_size: Size of Gamma LUT. Not used by legacy userspace > such as > + * X, which doesn't support large lut sizes. > + */ > + uint32_t gamma_lut_size; > + > /** >* @gamma_size: Size of legacy gamma ramp reported to userspace. Set up >* by calling drm_mode_crtc_set_gamma_size(). > -- > 2.33.0.882.g93a45727a2-goog > -- Sean Paul, Software Engineer, Google / Chromium OS

Re: [PATCH 2/2] amd/amdgpu_dm: Verify Gamma and Degamma LUT sizes using DRM Core check

2021-10-14 Thread Sean Paul
erify LUT sizes and use DRM Core function > instead. > > Tested on ChromeOS Zork. > > v1: > Remove amdgpu_dm_verify_lut_sizes everywhere. > Reviewed-by: Sean Paul > Signed-off-by: Mark Yacoub > --- > .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++--- > ...

Re: [PATCH 1/2] drm: Add Gamma and Degamma LUT sizes props to drm_crtc to validate.

2021-10-02 Thread Sean Paul
On Fri, Oct 01, 2021 at 04:34:34PM -0400, Sean Paul wrote: > On Wed, Sep 29, 2021 at 03:39:25PM -0400, Mark Yacoub wrote: > > From: Mark Yacoub > > > > [Why] > > 1. drm_atomic_helper_check doesn't check for the LUT sizes of either Gamma > > or Degamma pro

Re: [PATCH v2 00/17] drm: cleanup: Use DRM_MODESET_LOCK_ALL_* helpers where possible

2021-10-01 Thread Sean Paul
On Fri, Oct 01, 2021 at 10:00:50PM +0300, Ville Syrjälä wrote: > On Fri, Oct 01, 2021 at 02:36:55PM -0400, Sean Paul wrote: > > On Fri, Sep 24, 2021 at 08:43:07AM +0200, Fernando Ramos wrote: > > > Hi all, > > > > > > One of the things in the DRM TODO lis

Re: [PATCH 1/2] drm: Add Gamma and Degamma LUT sizes props to drm_crtc to validate.

2021-10-01 Thread Sean Paul
_size; > + Above, you're checking if (new_state_lut_size != gamma_size && new_state_lut_size != gamma_lut_size) fail; doesn't that imply that gamma_size and gamma_lut_size must always be equal? If so, perhaps turf this new state and rename degamma_lut_size to degamma_size to be consistent. De-duping this and initializing crtc->gamma_size in the initialization would mean the if (crtc->gamma_size) check in drm_crtc_supports_legacy_check() is no longer useful (and possibly other similar checks), so some care will need to be taken to avoid regression. I think the effort is worthwhile to avoid introducing new state. > /** >* @gamma_size: Size of legacy gamma ramp reported to userspace. Set up >* by calling drm_mode_crtc_set_gamma_size(). > -- > 2.33.0.685.g46640cef36-goog > -- Sean Paul, Software Engineer, Google / Chromium OS

Re: [PATCH 2/2] amd/amdgpu_dm: Verify Gamma and Degamma LUT sizes using DRM Core check

2021-10-01 Thread Sean Paul
from amdgpu_dm_update_crtc_color_mgmt() is not possible to remove, you could replace it with a call to the new helper function. And if _that_ is not possible, please make amdgpu_dm_verify_lut_sizes() static :-) Sean > - if (ret) > - goto fail; > - >

Re: [PATCH v2 00/17] drm: cleanup: Use DRM_MODESET_LOCK_ALL_* helpers where possible

2021-10-01 Thread Sean Paul
si.c | 6 +- > drivers/gpu/drm/tegra/hdmi.c | 6 +- > drivers/gpu/drm/tegra/sor.c | 11 ++- > drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 11 ++- > drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 12 ++- > include/drm/drm_modeset_lock.h| 2 - > 30 files changed, 265 insertions(+), 292 deletions(-) > > > base-commit: 6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f > -- > 2.33.0 > -- Sean Paul, Software Engineer, Google / Chromium OS

Re: [PATCH 15/15] doc: drm: remove TODO entry regarding DRM_MODSET_LOCK_ALL cleanup

2021-09-17 Thread Sean Paul
x27;s queue that up as part of the set. Reviewed-by: Sean Paul > > Signed-off-by: Fernando Ramos > --- > Documentation/gpu/todo.rst| 17 - > Documentation/locking/ww-mutex-design.rst | 2 +- > 2 files changed, 1 insertion(+), 18 deletions(-) &g

Re: [PATCH 14/15] drm/amd: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
modeset_lock_all(dev); > - dm_restore_drm_connector_state(dev, connector); > - drm_modeset_unlock_all(dev); > - > - drm_kms_helper_hotplug_event(dev); > } else if (param[0] == 0) { > if (!aconnector->dc_link) > goto unlock; > @@ -1259,13 +1257,16 @@ static ssize_t trigger_hotplug(struct file *f, const > char __user *buf, > > amdgpu_dm_update_connector_after_detect(aconnector); > > - drm_modeset_lock_all(dev); > - dm_restore_drm_connector_state(dev, connector); > - drm_modeset_unlock_all(dev); > - > - drm_kms_helper_hotplug_event(dev); > + } else { > + goto unlock; > } > > + DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); > + dm_restore_drm_connector_state(dev, connector); > + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); Check ret here? > + > + drm_kms_helper_hotplug_event(dev); > + > unlock: > mutex_unlock(&aconnector->hpd_lock); > > -- > 2.33.0 > -- Sean Paul, Software Engineer, Google / Chromium OS

Re: [PATCH 13/15] drm/gma500: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
> list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) > if (drm_helper_crtc_in_use(crtc)) > dev_priv->ops->restore_crtc(crtc); > @@ -232,7 +238,7 @@ static int psb_restore_display_registers(struct > drm_device *dev) > if (connector->restore) > connector->restore(&connector->base); > > - drm_modeset_unlock_all(dev); > + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); > return 0; Here too > } > > -- > 2.33.0 > -- Sean Paul, Software Engineer, Google / Chromium OS

Re: [PATCH 12/15] drm/i915: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
+ DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); > > return ret; > } > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > index 59fb4c710c8c..7a30e2ff2fed 100644 > --- a/drivers/gpu/drm/i915/i915_drv.c > +++ b/drivers/gpu/drm/i915/i915_drv.c > @@ -1009,31 +1009,35 @@ static void i915_driver_postclose(struct drm_device > *dev, struct drm_file *file) > static void intel_suspend_encoders(struct drm_i915_private *dev_priv) > { > struct drm_device *dev = &dev_priv->drm; > + struct drm_modeset_acquire_ctx ctx; > struct intel_encoder *encoder; > + int ret; > > if (!HAS_DISPLAY(dev_priv)) > return; > > - drm_modeset_lock_all(dev); > + DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); > for_each_intel_encoder(dev, encoder) > if (encoder->suspend) > encoder->suspend(encoder); > - drm_modeset_unlock_all(dev); > + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); > } > > static void intel_shutdown_encoders(struct drm_i915_private *dev_priv) > { > struct drm_device *dev = &dev_priv->drm; > + struct drm_modeset_acquire_ctx ctx; > struct intel_encoder *encoder; > + int ret; > > if (!HAS_DISPLAY(dev_priv)) > return; > > - drm_modeset_lock_all(dev); > + DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); > for_each_intel_encoder(dev, encoder) > if (encoder->shutdown) > encoder->shutdown(encoder); > - drm_modeset_unlock_all(dev); > + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); > } > > void i915_driver_shutdown(struct drm_i915_private *i915) > -- > 2.33.0 > -- Sean Paul, Software Engineer, Google / Chromium OS

Re: [PATCH 11/15] drm/msm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
e *s, > void *data) > dpu_crtc->vblank_cb_time = ktime_set(0, 0); > } > > - drm_modeset_unlock_all(crtc->dev); > + DRM_MODESET_LOCK_ALL_END(crtc->dev, ctx, ret); > > return 0; Return ret here > } > -- > 2.33.0 > -- Sean Paul, Software Engineer, Google / Chromium OS

Re: [PATCH 10/15] drm/nouveau: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
; > + DRM_MODESET_LOCK_ALL_BEGIN(drm_dev, ctx, 0, ret); > acomp->ops = &nv50_audio_component_ops; > acomp->dev = kdev; > drm->audio.component = acomp; > - drm_modeset_unlock_all(drm_dev); > + DRM_MODESET_LOCK_ALL_END(drm_dev, ctx, ret);

Re: [PATCH 09/15] drm/omapdrm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
x; > + int ret; > > - drm_modeset_lock_all(fb->dev); > + DRM_MODESET_LOCK_ALL_BEGIN(fb->dev, ctx, 0, ret); > > drm_for_each_crtc(crtc, fb->dev) > omap_crtc_flush(crtc); > > - drm_modeset_unlock_all(fb->dev); > + DRM_MODESET_LOCK_

Re: [PATCH 09/15] drm/omapdrm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
x; > + int ret; > > - drm_modeset_lock_all(fb->dev); > + DRM_MODESET_LOCK_ALL_BEGIN(fb->dev, ctx, 0, ret); > > drm_for_each_crtc(crtc, fb->dev) > omap_crtc_flush(crtc); > > - drm_modeset_unlock_all(fb->dev); > + DRM_MODESET_LOCK_ALL_END(fb-&g

Re: [PATCH 08/15] drm/radeon: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
59,7 +762,7 @@ static int radeon_debugfs_mst_info_show(struct seq_file > *m, void *unused) > radeon_connector->cur_stream_attribs[i].fe, > > radeon_connector->cur_stream_attribs[i].slots); > } > - drm_modeset_unlock_all(dev); > + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); > return 0; > } > > -- > 2.33.0 > -- Sean Paul, Software Engineer, Google / Chromium OS

Re: [PATCH 07/15] drm/shmobile: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
On Thu, Sep 16, 2021 at 11:15:44PM +0200, Fernando Ramos wrote: > As requested in Documentation/gpu/todo.rst, replace driver calls to > drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and > DRM_MODESET_LOCK_ALL_END() > > Signed-off-by: Fernando Ramos Reviewe

Re: [PATCH 06/15] drm/tegra: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
ut.encoder.crtc; > struct drm_device *drm = node->minor->dev; > + struct drm_modeset_acquire_ctx ctx; > unsigned int i; > int err = 0; > + int ret; You can use err here instead. With that fixed, Reviewed-by: Sean Paul > > - drm_modes

Re: [PATCH 05/15] drm/vmwgfx: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
On Thu, Sep 16, 2021 at 11:15:42PM +0200, Fernando Ramos wrote: > As requested in Documentation/gpu/todo.rst, replace driver calls to > drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and > DRM_MODESET_LOCK_ALL_END() > Reviewed-by: Sean Paul > Signed-off-by:

Re: [PATCH 04/15] drm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
On Thu, Sep 16, 2021 at 11:15:41PM +0200, Fernando Ramos wrote: > As requested in Documentation/gpu/todo.rst, replace driver calls to > drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and > DRM_MODESET_LOCK_ALL_END() > > Signed-off-by: Fernando Ramos Reviewe

Re: [PATCH 02/15] dmr/i915: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
), Reviewed-by: Sean Paul > Signed-off-by: Fernando Ramos > --- > drivers/gpu/drm/i915/display/intel_display.c | 17 - > 1 file changed, 4 insertions(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c > b/drivers/gpu/drm/i91

Re: [PATCH 03/15] dmr/msm: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
), Reviewed-by: Sean Paul > Signed-off-by: Fernando Ramos > --- > drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c > b/drivers/gpu/drm/

Re: [PATCH 01/15] dmr: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-17 Thread Sean Paul
ient_firmware_config(struct > drm_client_dev *client, > ret = false; > } > > - drm_modeset_drop_locks(&ctx); > - drm_modeset_acquire_fini(&ctx); > + DRM_MODESET_LOCK_ALL_END(dev, ctx, err); > > kfree(save_enabled); > return ret; > -- > 2.33.0 > -- Sean Paul, Software Engineer, Google / Chromium OS

[RESEND PATCH v6 06/14] drm/amd: Gate i2c transaction logs on drm_debug_syslog

2021-07-21 Thread Sean Paul
From: Sean Paul Since the logs protected by these checks specifically target syslog, use the new drm_debug_syslog_enabled() call to avoid triggering these prints when only trace is enabled. Acked-by: Christian König Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid

Re: [PATCH] Revert "drm/amd/display: Fix overlay validation by considering cursors"

2021-06-16 Thread Sean Paul
On Wed, Jun 16, 2021 at 12:21 PM Rodrigo Siqueira wrote: > > This reverts commit 04cc17a951f73f9a9092ca572b063e6292aeb085. > > The patch that we are reverting here was originally applied because it > fixes multiple IGT issues and flickering in Android. However, after a > discuss

Re: [PATCH] drm/amd/display: Fix overlay validation by considering cursors

2021-06-08 Thread Sean Paul
On Tue, Jun 8, 2021 at 3:07 PM Harry Wentland wrote: > > > > On 2021-06-08 3:47 a.m., Michel Dänzer wrote: > > On 2021-06-07 8:45 p.m., Sean Paul wrote: > >> > >> > >> On Mon, Jun 7, 2021 at 2:37 PM Harry Wentland >> <mailto:harry.wentl...

[PATCH v5 06/13] drm/amd: Gate i2c transaction logs on drm_debug_syslog

2020-06-08 Thread Sean Paul
From: Sean Paul Since the logs protected by these checks specifically target syslog, use the new drm_debug_syslog_enabled() call to avoid triggering these prints when only trace is enabled. Signed-off-by: Sean Paul Changes in v5: -Added to the set --- drivers/gpu/drm/amd/amdgpu

Re: [PATCH v2] drm/dp_mst: Remove VCPI while disabling topology mgr

2020-01-17 Thread Sean Paul
On Fri, Jan 17, 2020 at 3:27 PM Lyude Paul wrote: > > On Fri, 2020-01-17 at 11:19 -0500, Sean Paul wrote: > > On Mon, Dec 9, 2019 at 12:56 AM Lin, Wayne wrote: > > > > > > > > > > -Original Message- > > > > From: Lyude Paul >

Re: [PATCH v2] drm/dp_mst: Remove VCPI while disabling topology mgr

2020-01-17 Thread Sean Paul
On Mon, Dec 9, 2019 at 12:56 AM Lin, Wayne wrote: > > > > > -Original Message- > > From: Lyude Paul > > Sent: Saturday, December 7, 2019 3:57 AM > > To: Lin, Wayne ; dri-de...@lists.freedesktop.org; > > amd-gfx@lists.freedesktop.org > > Cc: Kazlauskas, Nicholas ; Wentland, Harry > > ; Zuo

Re: [PATCH v9 12/18] drm/dp_mst: Add branch bandwidth validation to MST atomic check

2020-01-17 Thread Sean Paul
On Fri, Jan 17, 2020 at 10:26 AM Mikita Lipski wrote: > > > > On 1/17/20 10:09 AM, Sean Paul wrote: > > On Fri, Dec 13, 2019 at 3:09 PM wrote: > >> > >> From: Mikita Lipski > >> > > > > Hi Mikita, > > Unfortunately this patch cau

Re: [PATCH v9 12/18] drm/dp_mst: Add branch bandwidth validation to MST atomic check

2020-01-17 Thread Sean Paul
On Fri, Dec 13, 2019 at 3:09 PM wrote: > > From: Mikita Lipski > Hi Mikita, Unfortunately this patch causes a crash on my i915 device when I unplug my MST hub. The panic is below. [ 38.514014] BUG: kernel NULL pointer dereference, address: 0030 [ 38.521801] #PF: supervisor read

Re: [PATCH RESEND 07/14] drm/msm/hdmi: Provide ddc symlink in hdmi connector sysfs directory

2019-11-06 Thread Sean Paul
On Mon, Aug 26, 2019 at 3:27 PM Andrzej Pietrasiewicz wrote: > > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz > Acked-by: Sam Ravnborg > Reviewed-by: Emil Velikov Acked-by: Sean Paul > --- > drivers/gpu/drm/msm/h

Re: [PATCH v5 07/14] drm/dp_mst: Don't forget to update port->input in drm_dp_mst_handle_conn_stat()

2019-10-22 Thread Sean Paul
resume reprobing. > > Cc: Juston Li > Cc: Imre Deak > Cc: Ville Syrjälä > Cc: Harry Wentland > Cc: Daniel Vetter > Signed-off-by: Lyude Paul > Reviewed-by: Sean Paul > --- > drivers/gpu/drm/drm_dp_mst_topology.c | 52 +++ > 1 file chan

Re: [PATCH v5 06/14] drm/dp_mst: Protect drm_dp_mst_port members with locking

2019-10-22 Thread Sean Paul
so, add a probe_lock that comes > before this patch. > * Just throw out ports that get changed from an output to an input, and > replace them with new ports. This lets us ensure that modesetting > contexts never see port->connector go from having a connector to being >

Re: [PATCH v5 05/14] drm/dp_mst: Add probe_lock

2019-10-22 Thread Sean Paul
ntrally called by all paths modifying the in-memory topology layout? drm_dp_add_port perhaps? That way we have a fallback in case something else starts mucking with the topology. Other than that, Reviewed-by: Sean Paul > > Signed-off-by: Lyude Paul > Cc: Juston Li > Cc: Imre D

Re: [PATCH 5/6] drm/amdgpu/dm/mst: Report possible_crtcs incorrectly, for now

2019-09-27 Thread Sean Paul
nt to briefly explain the u/s bug in case the links go sour. > + */ > + acrtc->mst_encoder->base.possible_crtcs = > + amdgpu_dm_get_encoder_crtc_mask(dm->adev); Why don't we put this hack in amdgpu_dm_dp_create_fake_mst_encoder()? Sean > + > re

Re: [PATCH v2 27/27] drm/dp_mst: Add topology ref history tracking for debugging

2019-09-27 Thread Sean Paul
bly grow the list a little more aggressively (or start it off at some size > 1) and avoid a bunch of reallocs. That said, I'm not sure how often it's reallocated so it might not be an issue. Either way, Reviewed-by: Sean Paul > Changes since v1: > * Don't forget to des

Re: [PATCH v2 26/27] drm/dp_mst: Also print unhashed pointers for malloc/topology references

2019-09-27 Thread Sean Paul
> } > @@ -1569,7 +1574,8 @@ static void drm_dp_mst_topology_get_port(struct > drm_dp_mst_port *port) > { > WARN_ON(kref_read(&port->topology_kref) == 0); > kref_get(&port->topology_kref); > - DRM_DEBUG("port %p (%d)\n", port, kref_read(&port->topology_kref)); > + DRM_DEBUG("port %p/%px (%d)\n", > + port, port, kref_read(&port->topology_kref)); > } > > /** > @@ -1585,8 +1591,8 @@ static void drm_dp_mst_topology_get_port(struct > drm_dp_mst_port *port) > */ > static void drm_dp_mst_topology_put_port(struct drm_dp_mst_port *port) > { > - DRM_DEBUG("port %p (%d)\n", > - port, kref_read(&port->topology_kref) - 1); > + DRM_DEBUG("port %p/%px (%d)\n", > + port, port, kref_read(&port->topology_kref) - 1); > kref_put(&port->topology_kref, drm_dp_destroy_port); > } > > -- > 2.21.0 > -- Sean Paul, Software Engineer, Google / Chromium OS

Re: [PATCH v2 25/27] drm/dp_mst: Add basic topology reprobing when resuming

2019-09-27 Thread Sean Paul
r they resume */ > - sret = drm_dp_dpcd_read(mgr->aux, DP_GUID, guid, 16); > - if (sret != 16) { > - DRM_DEBUG_KMS("dpcd read failed - undocked during > suspend?\n"); > - ret = -1; > - goto

Re: [PATCH v2 03/27] drm/dp_mst: Destroy MSTBs asynchronously

2019-09-27 Thread Sean Paul
On Wed, Sep 25, 2019 at 04:08:22PM -0400, Lyude Paul wrote: > On Wed, 2019-09-25 at 14:16 -0400, Sean Paul wrote: > > On Tue, Sep 03, 2019 at 04:45:41PM -0400, Lyude Paul wrote: > > > When reprobing an MST topology during resume, we have to account for the > > > fact t

Re: [PATCH v2 16/27] drm/dp_mst: Refactor pdt setup/teardown, add more locking

2019-09-27 Thread Sean Paul
On Wed, Sep 25, 2019 at 05:00:00PM -0400, Lyude Paul wrote: > On Wed, 2019-09-25 at 15:27 -0400, Sean Paul wrote: > > On Tue, Sep 03, 2019 at 04:45:54PM -0400, Lyude Paul wrote: > > > Since we're going to be implementing suspend/resume reprobing very soon, > > > w

Re: [PATCH v2 24/27] drm/amdgpu/dm: Resume short HPD IRQs before resuming MST topology

2019-09-25 Thread Sean Paul
e here, s/ / / && s/enamble/enable/ && s_*/_ */_ > + s3_handle_mst(ddev, false); > + > /* Do detection*/ > drm_connector_list_iter_begin(ddev, &iter); > drm_for_each_connector_iter(connector, &iter) { > -- > 2.21.0 > -- Sean Paul, Software Engineer, Google / Chromium OS

Re: [PATCH v2 22/27] drm/nouveau: Don't grab runtime PM refs for HPD IRQs

2019-09-25 Thread Sean Paul
t; Cc: Ville Syrjälä > Cc: Harry Wentland > Cc: Daniel Vetter > Signed-off-by: Lyude Paul Seems reasonable to me, but would feel better if a nouveau person confirmed Reviewed-by: Sean Paul > --- > drivers/gpu/drm/nouveau/nouveau_connector.c | 33 +++-- > 1 file cha

Re: [PATCH v2 21/27] drm/dp_mst: Don't forget to update port->input in drm_dp_mst_handle_conn_stat()

2019-09-25 Thread Sean Paul
resume reprobing. > > Cc: Juston Li > Cc: Imre Deak > Cc: Ville Syrjälä > Cc: Harry Wentland > Cc: Daniel Vetter > Signed-off-by: Lyude Paul Nice catch! Same comment here re: port->mutex, but we can sort that out on the other thread Reviewed-by: Sean Paul >

Re: [PATCH v2 20/27] drm/dp_mst: Protect drm_dp_mst_port members with connection_mutex

2019-09-25 Thread Sean Paul
. Protected by > + * &drm_device.mode_config.connection_mutex. > + * @available_pbn: Available bandwidth for this port. Protected by > + * &drm_device.mode_config.connection_mutex. > * @next: link to next port on this branch device > * @mstb: branch device on this port, protected by > * &drm_dp_mst_topology_mgr.lock > * @aux: i2c aux transport to talk to device connected to this port, > protected > - * by &drm_dp_mst_topology_mgr.lock > + * by &drm_device.mode_config.connection_mutex. > * @parent: branch device parent of this port > * @vcpi: Virtual Channel Payload info for this port. > - * @connector: DRM connector this port is connected to. > + * @connector: DRM connector this port is connected to. Protected by @lock. > + * When there is already a connector registered for this port, this is also > + * protected by &drm_device.mode_config.connection_mutex. > * @mgr: topology manager this port lives under. > * > * This structure represents an MST port endpoint on a device somewhere > @@ -100,6 +111,12 @@ struct drm_dp_mst_port { > struct drm_connector *connector; > struct drm_dp_mst_topology_mgr *mgr; > > + /** > + * @lock: Protects @connector. If needed, this lock should be grabbed > + * before &drm_device.mode_config.connection_mutex. > + */ > + struct mutex lock; > + > /** >* @cached_edid: for DP logical ports - make tiling work by ensuring >* that the EDID for all connectors is read immediately. > -- > 2.21.0 > -- Sean Paul, Software Engineer, Google / Chromium OS

Re: [PATCH v2 19/27] drm/dp_mst: Handle UP requests asynchronously

2019-09-25 Thread Sean Paul
mutex. This also fixes MST branch device hotplugging on i915, > finally! > > Cc: Juston Li > Cc: Imre Deak > Cc: Ville Syrjälä > Cc: Harry Wentland > Cc: Daniel Vetter > Signed-off-by: Lyude Paul Looks really good! Reviewed-by: Sean Paul > --- > drivers/gpu/

Re: [PATCH v2 18/27] drm/dp_mst: Remove lies in {up,down}_rep_recv documentation

2019-09-25 Thread Sean Paul
entland > Cc: Daniel Vetter > Signed-off-by: Lyude Paul Reviewed-by: Sean Paul > --- > include/drm/drm_dp_mst_helper.h | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h > in

Re: [PATCH v2 17/27] drm/dp_mst: Rename drm_dp_add_port and drm_dp_update_port

2019-09-25 Thread Sean Paul
ton Li > Cc: Imre Deak > Cc: Ville Syrjälä > Cc: Harry Wentland > Cc: Daniel Vetter > Signed-off-by: Lyude Paul Reviewed-by: Sean Paul > --- > drivers/gpu/drm/drm_dp_mst_topology.c | 17 ++--- > 1 file changed, 10 insertions(+), 7 deletions(-) &g

Re: [PATCH v2 16/27] drm/dp_mst: Refactor pdt setup/teardown, add more locking

2019-09-25 Thread Sean Paul
DRM_ERROR("Failed to change PDT for port %p: %d\n", > + port, ret); > + dowork = false; > + } > } > > drm_dp_mst_topology_put_port(port); > @@ -4003,9 +4036,7 @@ drm_dp_delayed_destroy_port(struct drm_dp_mst_port > *port) > if (port->connector) > port->mgr->cbs->destroy_connector(port->mgr, port->connector); > > - drm_dp_port_teardown_pdt(port, port->pdt); > - port->pdt = DP_PEER_DEVICE_NONE; > - > + drm_dp_port_set_pdt(port, DP_PEER_DEVICE_NONE); > drm_dp_mst_put_port_malloc(port); > } > > diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h > index 5423a8adda78..f253ee43e9d9 100644 > --- a/include/drm/drm_dp_mst_helper.h > +++ b/include/drm/drm_dp_mst_helper.h > @@ -55,8 +55,10 @@ struct drm_dp_vcpi { > * @num_sdp_stream_sinks: Number of stream sinks > * @available_pbn: Available bandwidth for this port. > * @next: link to next port on this branch device > - * @mstb: branch device attach below this port > - * @aux: i2c aux transport to talk to device connected to this port. > + * @mstb: branch device on this port, protected by > + * &drm_dp_mst_topology_mgr.lock > + * @aux: i2c aux transport to talk to device connected to this port, > protected > + * by &drm_dp_mst_topology_mgr.lock > * @parent: branch device parent of this port > * @vcpi: Virtual Channel Payload info for this port. > * @connector: DRM connector this port is connected to. > -- > 2.21.0 > -- Sean Paul, Software Engineer, Google / Chromium OS ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH v2 14/27] drm/dp_mst: Destroy topology_mgr mutexes

2019-09-25 Thread Sean Paul
e Syrjälä > Cc: Harry Wentland > Cc: Daniel Vetter > Signed-off-by: Lyude Paul Cleanup is overrated :) Reviewed-by: Sean Paul > --- > drivers/gpu/drm/drm_dp_mst_topology.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/drm_dp_mst_topolo

Re: [PATCH v2 08/27] drm/dp_mst: Remove PDT teardown in drm_dp_destroy_port() and refactor

2019-09-25 Thread Sean Paul
lle Syrjälä > Cc: Harry Wentland > Cc: Daniel Vetter > Signed-off-by: Lyude Paul Reviewed-by: Sean Paul > --- > drivers/gpu/drm/drm_dp_mst_topology.c | 40 +++ > 1 file changed, 16 insertions(+), 24 deletions(-) > > diff --git a/drivers/gp

Re: [PATCH v2 04/27] drm/dp_mst: Move test_calc_pbn_mode() into an actual selftest

2019-09-25 Thread Sean Paul
gt; > Cc: Juston Li > Cc: Imre Deak > Cc: Ville Syrjälä > Cc: Harry Wentland > Reviewed-by: Daniel Vetter > Signed-off-by: Lyude Paul Reviewed-by: Sean Paul > --- > drivers/gpu/drm/drm_dp_mst_topology.c | 27 --- > drivers/gpu/drm/selft

Re: [PATCH v2 03/27] drm/dp_mst: Destroy MSTBs asynchronously

2019-09-25 Thread Sean Paul
*/ > struct kref malloc_kref; > > + /** > + * @destroy_next: linked-list entry used by > + * drm_dp_delayed_destroy_work() > + */ > + struct list_head destroy_next; > + > u8 rad[8]; > u8 lct; > int num_ports; > @@ -575,18 +581,24 @@ struct drm_dp_mst_topology_mgr { > struct work_struct tx_work; > > /** > - * @destroy_connector_list: List of to be destroyed connectors. > + * @destroy_port_list: List of to be destroyed connectors. > + */ > + struct list_head destroy_port_list; > + /** > + * @destroy_branch_device_list: List of to be destroyed branch > + * devices. >*/ > - struct list_head destroy_connector_list; > + struct list_head destroy_branch_device_list; > /** > - * @destroy_connector_lock: Protects @connector_list. > + * @delayed_destroy_lock: Protects @destroy_port_list and > + * @destroy_branch_device_list. >*/ > - struct mutex destroy_connector_lock; > + struct mutex delayed_destroy_lock; > /** > - * @destroy_connector_work: Work item to destroy connectors. Needed to > - * avoid locking inversion. > + * @delayed_destroy_work: Work item to destroy MST port and branch > + * devices, needed to avoid locking inversion. >*/ > - struct work_struct destroy_connector_work; > + struct work_struct delayed_destroy_work; > }; > > int drm_dp_mst_topology_mgr_init(struct drm_dp_mst_topology_mgr *mgr, > -- > 2.21.0 > -- Sean Paul, Software Engineer, Google / Chromium OS ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH v2 02/27] drm/dp_mst: Get rid of list clear in destroy_connector_work

2019-09-25 Thread Sean Paul
and > Reviewed-by: Daniel Vetter > Signed-off-by: Lyude Paul Reviewed-by: Sean Paul > --- > drivers/gpu/drm/drm_dp_mst_topology.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c > b/drivers/gpu/drm/drm_dp_mst_topology.c

Re: [PATCH v2 01/27] drm/dp_mst: Move link address dumping into a function

2019-09-25 Thread Sean Paul
On Tue, Sep 03, 2019 at 04:45:39PM -0400, Lyude Paul wrote: > Makes things easier to read. > > Cc: Juston Li > Cc: Imre Deak > Cc: Ville Syrjälä > Cc: Harry Wentland > Reviewed-by: Daniel Vetter > Signed-off-by: Lyude Paul Reviewed-by: Sean Paul

[PATCH] drm/amdgpu: Fix connector atomic_check compilation fail

2019-06-13 Thread Sean Paul
From: Sean Paul I missed amdgpu in my connnector_helper_funcs->atomic_check conversion, which is understandably causing compilation failures. Fixes: 6f3b62781bbd ("drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state") Cc: Daniel Vetter Cc: Ville S

Re: [PATCH v3 5/5] drm: don't block fb changes for async plane updates

2019-05-07 Thread Sean Paul
uot;(&drm_plane.state)" so it's more clear what you're referring to here? > + * and new_state. This is required because prepare and cleanup calls > + * are performed on the new_state object, then to cleanup the old > + * framebuf

Re: [PATCH 2/6] drm/drv: Prepare to remove drm_dev_unplug()

2019-02-07 Thread Sean Paul
On Thu, Feb 07, 2019 at 04:07:33PM -0500, Sean Paul wrote: > On Sun, Feb 03, 2019 at 04:41:56PM +0100, Noralf Trønnes wrote: > > The only thing now that makes drm_dev_unplug() special is that it sets > > drm_device->unplugged. Move this code to drm_dev_unregister() so that

Re: [PATCH 6/6] drm/drv: Remove drm_dev_unplug()

2019-02-07 Thread Sean Paul
On Sun, Feb 03, 2019 at 04:42:00PM +0100, Noralf Trønnes wrote: > There are no users left. > > Signed-off-by: Noralf Trønnes Reviewed-by: Sean Paul > --- > drivers/gpu/drm/drm_drv.c | 17 - > include/drm/drm_drv.h | 1 - > 2 files changed, 18 deletio

Re: [PATCH 4/6] drm/udl: Use drm_dev_unregister()

2019-02-07 Thread Sean Paul
On Sun, Feb 03, 2019 at 04:41:58PM +0100, Noralf Trønnes wrote: > drm_dev_unplug() has been stripped down and is going away. Open code its > 2 remaining function calls. > > Cc: Dave Airlie > Cc: Sean Paul Reviewed-by: Sean Paul > Signed-off-by: Noralf Trønnes > --- &

Re: [PATCH 2/6] drm/drv: Prepare to remove drm_dev_unplug()

2019-02-07 Thread Sean Paul
r naming bikeshed, so maybe this would be better off as a follow-on series where everyone can pile on opinions. So, Reviewed-by: Sean Paul > > Noralf. > > > drivers/gpu/drm/drm_drv.c | 27 +++ > include/drm/drm_drv.h | 10 -- > 2 fi

Re: [PATCH 1/6] drm: Fix drm_release() and device unplug

2019-02-07 Thread Sean Paul
device as long as there's open fd(s) > - The driver holds a ref on drm_device as long as it's bound to the > struct device > > When both sides are done with drm_device, it is released. > > Signed-off-by: Noralf Trønnes Reviewed-by: Sean Paul > --- > drivers/gpu/dr

Re: [PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers

2018-12-11 Thread Sean Paul
gt; > > > Needs a tiny bit of open-coding, but less midlayer beats that I think. > > > > Cc: Sam Bobroff > > Signed-off-by: Daniel Vetter > > Cc: Maarten Lankhorst > > Cc: Maxime Ripard > > Cc: Sean Paul > > Cc: David Airlie > > Cc: Ben S

Re: [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Sean Paul
; Cc: Liviu Dudau > Cc: Brian Starkey > Cc: Mali DP Maintainers > Cc: Boris Brezillon > Cc: Nicolas Ferre > Cc: Alexandre Belloni > Cc: Ludovic Desroches > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Sean Paul > Cc: Jani Nikula > Cc: Joonas Lahtinen &

Re: [PATCH] RFC: Make igts for cross-driver stuff mandatory?

2018-10-25 Thread Sean Paul
rrible hacks below, I also didn't have libunwind, so removed its usage. Sean /snip From ab8c7d274c32559295b38d6ceeaabded14b207d4 Mon Sep 17 00:00:00 2001 From: Sean Paul Date: Thu, 25 Oct 2018 08:40:28 -0400 Subject: [PATCH] igt: Hacks to compile in CrOS chroot Signed-off-by: S

Re: [Intel-gfx] RFC: Migration to Gitlab

2018-08-22 Thread Sean Paul
teers who want to join the fun, besides comments and > thoughts on the overall topic of course. I'm pretty keen on getting this done, so I'll volunteer some cycles if there's something that needs doing. Sean > > Cheers, Daniel > -- > Daniel Vetter > Software

Re: [PATCH] drm/core: Fail atomic IOCTL with no CRTC state but with signaling.

2017-06-19 Thread Sean Paul
*/ > > + if (c == 0 && (arg->flags & DRM_MODE_PAGE_FLIP_EVENT)) > > + return -EINVAL; > > + > > return 0; > > } > > > > @@ -2179,6 +2188,8 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, > > drm

Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-22 Thread Sean Paul
a proper commit message now. > > > The bug was only introduced to radeon, not amdgpu. > > > > Tested-by: Nicolai Stange > > > > Thanks for the quick fix! > > > > > @Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't > > &

Re: [PATCH 3/5] drm/syncobj: add sync_file interaction.

2017-05-12 Thread Sean Paul
> This should only be used to interact with sync files where necessary. > > Signed-off-by: Dave Airlie With Daniel's comments taken into account, Reviewed-by: Sean Paul > --- > drivers/gpu/drm/drm_syncobj.c | 56 > +++ > i

Re: [PATCH 2/5] drm/syncobj: add sync obj wait interface. (v2)

2017-05-12 Thread Sean Paul
ept relative timeout, pass remaining time back > to userspace. > > Signed-off-by: Dave Airlie Reviewed-by: Sean Paul > --- > drivers/gpu/drm/drm_internal.h | 2 + > drivers/gpu/drm/drm_ioctl.c| 2 + > drivers/gpu/drm/drm_syncobj.c | 139 > +

Re: [PATCH 1/5] drm: introduce sync objects (v2)

2017-05-12 Thread Sean Paul
mutex in favour of cmpxchg (Chris) > document drm_syncobj_fence_get > use ENOENT for syncobj lookup. > > Signed-off-by: Dave Airlie With Daniel's comments addressed, Reviewed-by: Sean Paul > > fixup > --- > Documentation/gpu/drm-internals.rst | 3 + > Documentati

Re: [PATCH 1/5] drm: introduce sync objects

2017-05-09 Thread Sean Paul
M_IOWR(0xC1, struct > drm_syncobj_handle) > +#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct > drm_syncobj_handle) > + > /** > * Device specific ioctls should only be in their respective headers > * The device specific ioctl range is from 0x40 to 0x9f. > -- > 2.9.3 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Sean Paul, Software Engineer, Google / Chromium OS ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-06 Thread Sean Paul
On Mon, Sep 5, 2016 at 3:00 AM, Huang Rui wrote: > In previous drm_global_item_ref, there are two times of writing > ref->object if item->refcount is 0. So this patch does a minor update > to put alloc and init ref firstly, and then to modify the item of glob > array. Use "else" to avoid two times

Re: [PATCH] drm/ttm: partial revert "cleanup ttm_tt_(unbind|destroy)" v2

2016-07-24 Thread Sean Paul
On Fri, Jul 22, 2016 at 9:10 AM, Christian König wrote: > From: Christian König > > We still need to unbind explicitely during a move. Sorry for the drive-by nit, but: s/explicitely/explicitly/ > > This partial reverts commit ff20caa0bcbfef9f7686f8d1868a3b990921afd6. > > v2: remove unnecessar