diff mbox

[1/9] drm/i915/mst: Debug log connector name in destroy_connector()

Message ID 20170912235730.3492-1-dhinakaran.pandiyan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dhinakaran Pandiyan Sept. 12, 2017, 11:57 p.m. UTC
Print connector name in destroy_connect() and this doesn't add any extra
lines to dmesg. The debug macro has been moved before the unregister
call so that we don't lose the connector name and id.

Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 drivers/gpu/drm/i915/intel_dp_mst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Ausmus Sept. 14, 2017, 12:20 a.m. UTC | #1
On Tue, Sep 12, 2017 at 4:57 PM, Dhinakaran Pandiyan
<dhinakaran.pandiyan@intel.com> wrote:
> Print connector name in destroy_connect() and this doesn't add any extra
> lines to dmesg. The debug macro has been moved before the unregister
> call so that we don't lose the connector name and id.
>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

Reviewed-by: James Ausmus <james.ausmus@intel.com>

While I was looking around here, though, I noticed we don't currently
handle error returns from the drm layer calls in
intel_dp_add_mst_connector. I'll try to send a patch along tomorrow
for that.

> ---
>  drivers/gpu/drm/i915/intel_dp_mst.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> index 8e3aad0ea60b..88d1d2b9ac56 100644
> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> @@ -494,6 +494,7 @@ static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>         struct intel_connector *intel_connector = to_intel_connector(connector);
>         struct drm_i915_private *dev_priv = to_i915(connector->dev);
>
> +       DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, connector->name);
>         drm_connector_unregister(connector);
>
>         if (dev_priv->fbdev)
> @@ -505,7 +506,6 @@ static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>         drm_modeset_unlock(&connector->dev->mode_config.connection_mutex);
>
>         drm_connector_unreference(connector);
> -       DRM_DEBUG_KMS("\n");
>  }
>
>  static void intel_dp_mst_hotplug(struct drm_dp_mst_topology_mgr *mgr)
> --
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Dhinakaran Pandiyan Sept. 14, 2017, 7:22 p.m. UTC | #2
On Wed, 2017-09-13 at 17:20 -0700, Ausmus, James wrote:
> On Tue, Sep 12, 2017 at 4:57 PM, Dhinakaran Pandiyan

> <dhinakaran.pandiyan@intel.com> wrote:

> > Print connector name in destroy_connect() and this doesn't add any extra

> > lines to dmesg. The debug macro has been moved before the unregister

> > call so that we don't lose the connector name and id.

> >

> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

> 

> Reviewed-by: James Ausmus <james.ausmus@intel.com>

> 

> While I was looking around here, though, I noticed we don't currently

> handle error returns from the drm layer calls in

> intel_dp_add_mst_connector. I'll try to send a patch along tomorrow

> for that.

> 


Thanks for the review and yeah, that does look wrong.


> > ---

> >  drivers/gpu/drm/i915/intel_dp_mst.c | 2 +-

> >  1 file changed, 1 insertion(+), 1 deletion(-)

> >

> > diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c

> > index 8e3aad0ea60b..88d1d2b9ac56 100644

> > --- a/drivers/gpu/drm/i915/intel_dp_mst.c

> > +++ b/drivers/gpu/drm/i915/intel_dp_mst.c

> > @@ -494,6 +494,7 @@ static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,

> >         struct intel_connector *intel_connector = to_intel_connector(connector);

> >         struct drm_i915_private *dev_priv = to_i915(connector->dev);

> >

> > +       DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, connector->name);

> >         drm_connector_unregister(connector);

> >

> >         if (dev_priv->fbdev)

> > @@ -505,7 +506,6 @@ static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,

> >         drm_modeset_unlock(&connector->dev->mode_config.connection_mutex);

> >

> >         drm_connector_unreference(connector);

> > -       DRM_DEBUG_KMS("\n");

> >  }

> >

> >  static void intel_dp_mst_hotplug(struct drm_dp_mst_topology_mgr *mgr)

> > --

> > 2.11.0

> >

> > _______________________________________________

> > Intel-gfx mailing list

> > Intel-gfx@lists.freedesktop.org

> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx

> 

> 

>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index 8e3aad0ea60b..88d1d2b9ac56 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -494,6 +494,7 @@  static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 	struct intel_connector *intel_connector = to_intel_connector(connector);
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 
+	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, connector->name);
 	drm_connector_unregister(connector);
 
 	if (dev_priv->fbdev)
@@ -505,7 +506,6 @@  static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 	drm_modeset_unlock(&connector->dev->mode_config.connection_mutex);
 
 	drm_connector_unreference(connector);
-	DRM_DEBUG_KMS("\n");
 }
 
 static void intel_dp_mst_hotplug(struct drm_dp_mst_topology_mgr *mgr)