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

2023-07-23 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

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

2023-07-23 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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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

[Nouveau] [RESEND PATCH v6 08/14] drm/nouveau: Change debug checks to specifically target 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. Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200608210505.48519-9-s

Re: [Nouveau] [Intel-gfx] [RFC v2 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()

2020-08-21 Thread Sean Paul
account for > the fact that downstream port caps can be either 1 byte or 4 bytes > long. We can actually skip fixing the max_clock/max_bpc helpers here > since they all check for DP_DETAILED_CAP_INFO_AVAILABLE anyway. > * Fix ret code check for drm_dp_dpcd_read > Thanks for sortin

Re: [Nouveau] [RFC 19/20] drm/i915/dp: Extract drm_dp_read_dpcd_caps()

2020-08-19 Thread Sean Paul
+{ > + int ret; > + > + ret = drm_dp_dpcd_read(aux, DP_DPCD_REV, dpcd, DP_RECEIVER_CAP_SIZE); > + if (ret != DP_RECEIVER_CAP_SIZE || dpcd[DP_DPCD_REV] == 0) > + return -EIO; > + > + ret = drm_dp_read_extended_dpcd_caps(aux, dpcd); > +

Re: [Nouveau] [RFC 16/20] drm/i915/dp: Extract drm_dp_get_sink_count()

2020-08-19 Thread Sean Paul
if (ret < 0) > return false; > > - /* > - * Sink count can change between short pulse hpd hence > - * a member variable in intel_dp will track any changes > - * between s

Re: [Nouveau] [RFC 15/20] drm/i915/dp: Extract drm_dp_has_sink_count()

2020-08-19 Thread Sean Paul
vers can use them as well. > > Note that this also starts using intel_dp_has_sink_count() in > intel_dp_detect_dpcd(), which is a functional change. > Reviewed-by: Sean Paul > Signed-off-by: Lyude Paul > --- > drivers/gpu/drm/drm_dp_helper.c | 22

Re: [Nouveau] [RFC 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()

2020-08-19 Thread Sean Paul
u8 real_edid_checksum); > > +int drm_dp_downstream_read_info(struct drm_dp_aux *aux, > + const u8 dpcd[DP_RECEIVER_CAP_SIZE], > + u8 downstream_ports[DP_MAX_DOWNSTREAM_PORTS]); > int drm_dp_downstream_max_clock(const

Re: [Nouveau] [RFC 09/20] drm/i915/dp: Extract drm_dp_has_mst()

2020-08-19 Thread Sean Paul
On Tue, Aug 11, 2020 at 04:04:46PM -0400, Lyude Paul wrote: > Just a tiny drive-by cleanup, we can consolidate i915's code for > checking for MST support into a helper to be shared across drivers. > Reviewed-by: Sean Paul > Signed-off-by: Lyude Paul > --- > drive

[Nouveau] [PATCH v5 08/13] drm/nouveau: Change debug checks to specifically target 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/nouveau/dispnv50/disp.h

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

2019-12-27 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: [Nouveau] [PATCH v2 24/27] drm/amdgpu/dm: Resume short HPD IRQs before resuming MST topology

2019-12-27 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 Engi

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

2019-12-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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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->topo

Re: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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 ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau

Re: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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 ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau

Re: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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: [Nouveau] [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 ___ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau

Re: [Nouveau] [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: [Nouveau] [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

[Nouveau] [PATCH v5 04/11] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state

2019-06-11 Thread Sean Paul
From: Sean Paul Everyone who implements connector_helper_funcs->atomic_check reaches into the connector state to get the atomic state. Instead of continuing this pattern, change the callback signature to just give atomic state and let the driver determine what it does and does not need from

Re: [PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state

2019-05-16 Thread Sean Paul
On Thu, May 16, 2019 at 03:00:01PM +0300, Laurent Pinchart wrote: > Hi Sean, > > On Mon, May 13, 2019 at 10:38:58AM -0400, Sean Paul wrote: > > On Sat, May 11, 2019 at 3:12 PM Laurent Pinchart wrote: > > > On Thu, May 02, 2019 at 03:49:46PM -0400, Sean Paul wrote

Re: [Nouveau] [PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state

2019-05-13 Thread Sean Paul
On Sat, May 11, 2019 at 3:12 PM Laurent Pinchart wrote: > > Hi Sean, > > Thank you for the patch. > Hey Laurent, Thanks for looking! > On Thu, May 02, 2019 at 03:49:46PM -0400, Sean Paul wrote: > > From: Sean Paul > > > > Everyone who implements connecto

[Nouveau] [PATCH v4 04/11] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state

2019-05-08 Thread Sean Paul
From: Sean Paul Everyone who implements connector_helper_funcs->atomic_check reaches into the connector state to get the atomic state. Instead of continuing this pattern, change the callback signature to just give atomic state and let the driver determine what it does and does not need from

[Nouveau] [PATCH v3 04/10] drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state

2019-05-02 Thread Sean Paul
From: Sean Paul Everyone who implements connector_helper_funcs->atomic_check reaches into the connector state to get the atomic state. Instead of continuing this pattern, change the callback signature to just give atomic state and let the driver determine what it does and does not need from

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

2018-12-12 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: [Nouveau] [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-15 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: [Nouveau] [PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers

2018-02-14 Thread Sean Paul
On Wed, Feb 14, 2018 at 03:43:56PM +0100, Michel Dänzer wrote: > On 2018-02-14 03:08 PM, Sean Paul wrote: > > On Wed, Feb 14, 2018 at 10:26:35AM +0100, Maarten Lankhorst wrote: > >> Op 14-02-18 om 09:46 schreef Lukas Wunner: > >>> Dear drm-misc maintainers, > >

Re: [Nouveau] [PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers

2018-02-14 Thread Sean Paul
be made that > > fixes is more appropriate. > > > > I'm lacking experience making such decisions and would be interested > > to learn how you'd handle this. > > > > Thanks, > > > > Lukas > > I would say fixe

Re: [Nouveau] [PATCH 14/24] drm/nouveau: Merge pre/postclose hooks

2017-03-13 Thread Sean Paul
stclose had me a little nervous. However, it seems like the reference is just needed for nouveau_abi16_fini() and nouveau_cli_fini(), as opposed to being needed while drm_release() is active. Reviewed-by: Sean Paul > > Cc: Ben Skeggs > Cc: nouveau@lists.freedesktop.org > Si

Re: [Nouveau] [Intel-gfx] [PATCH 1/3] drm/atomic: Make disable_all helper fully disable the crtc.

2017-03-03 Thread Sean Paul
> - } > - > -unlock: > - if (PTR_ERR(state) == -EDEADLK) { > - drm_modeset_backoff(&ctx); > - goto retry; > - } > - > - drm_modeset_drop_locks(&ctx); > - drm_modeset_acquire_fini(&ctx); > - return state; > -} > - > int > nouve

Re: [Nouveau] [PATCH v2] drm/nouveau/gr: mark gm107_grctx_generate_tpcid() static

2016-08-31 Thread Sean Paul
On Mon, Aug 29, 2016 at 9:02 AM, Baoyou Xie wrote: > We get 1 warning when build kernel with W=1: > drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c:937:1: warning: no previous > prototype for 'gm107_grctx_generate_tpcid' [-Wmissing-prototypes] > > In fact, this function is only used in the file