From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: "Kirill A . Shutemov" <kirill@shutemov.name>,
Carlos Santa <carlos.santa@intel.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2 3/4] drm/dp/mst: Clear port->pdt when tearing down the i2c adapter
Date: Wed, 26 Oct 2016 16:35:50 +0300 [thread overview]
Message-ID: <20161026133550.GF4617@intel.com> (raw)
In-Reply-To: <1477488633-16544-1-git-send-email-ville.syrjala@linux.intel.com>
On Wed, Oct 26, 2016 at 04:30:33PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The i2c adapter is only relevant for some peer device types, so
> let's clear the pdt if it's still the same as the old_pdt when we
> tear down the i2c adapter.
>
> I don't really like this design pattern of updating port->whatever
> before doing the accompanying changes and passing around old_whatever
> to figure stuff out. Would make much more sense to me to the pass the
> new value around and only update the port->whatever when things are
> consistent. But let's try to work with what we have right now.
>
> v2: Clear port->pdt in the caller, if needed (Daniel)
>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: stable@vger.kernel.org
> Cc: Carlos Santa <carlos.santa@intel.com>
> Cc: Kirill A. Shutemov <kirill@shutemov.name>
> Tested-by: Carlos Santa <carlos.santa@intel.com> (v1)
> Tested-by: Kirill A. Shutemov <kirill@shutemov.name> (v1)
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97666
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index 04e457117980..ba13f9d8720b 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -914,6 +914,7 @@ static void drm_dp_destroy_port(struct kref *kref)
> /* no need to clean up vcpi
> * as if we have no connector we never setup a vcpi */
> drm_dp_port_teardown_pdt(port, port->pdt);
> + port->pdt = DP_PEER_DEVICE_NONE;
And naturally I forgot to amend the commit message w.r.t. this guy.
We don't really need to do this here, but I figured I'd try to be a
bit more consistent by having it, just to avoid accidental mistakes
if/when someone changes this stuff again later.
> }
> kfree(port);
> }
> @@ -2919,6 +2920,7 @@ static void drm_dp_destroy_connector_work(struct work_struct *work)
> mgr->cbs->destroy_connector(mgr, port->connector);
>
> drm_dp_port_teardown_pdt(port, port->pdt);
> + port->pdt = DP_PEER_DEVICE_NONE;
>
> if (!port->input && port->vcpi.vcpi > 0) {
> drm_dp_mst_reset_vcpi_slots(mgr, port);
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel OTC
_______________________________________________
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: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: "Kirill A . Shutemov" <kirill@shutemov.name>,
stable@vger.kernel.org, Carlos Santa <carlos.santa@intel.com>
Subject: Re: [PATCH v2 3/4] drm/dp/mst: Clear port->pdt when tearing down the i2c adapter
Date: Wed, 26 Oct 2016 16:35:50 +0300 [thread overview]
Message-ID: <20161026133550.GF4617@intel.com> (raw)
In-Reply-To: <1477488633-16544-1-git-send-email-ville.syrjala@linux.intel.com>
On Wed, Oct 26, 2016 at 04:30:33PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrj�l� <ville.syrjala@linux.intel.com>
>
> The i2c adapter is only relevant for some peer device types, so
> let's clear the pdt if it's still the same as the old_pdt when we
> tear down the i2c adapter.
>
> I don't really like this design pattern of updating port->whatever
> before doing the accompanying changes and passing around old_whatever
> to figure stuff out. Would make much more sense to me to the pass the
> new value around and only update the port->whatever when things are
> consistent. But let's try to work with what we have right now.
>
> v2: Clear port->pdt in the caller, if needed (Daniel)
>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: stable@vger.kernel.org
> Cc: Carlos Santa <carlos.santa@intel.com>
> Cc: Kirill A. Shutemov <kirill@shutemov.name>
> Tested-by: Carlos Santa <carlos.santa@intel.com> (v1)
> Tested-by: Kirill A. Shutemov <kirill@shutemov.name> (v1)
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97666
> Signed-off-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index 04e457117980..ba13f9d8720b 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -914,6 +914,7 @@ static void drm_dp_destroy_port(struct kref *kref)
> /* no need to clean up vcpi
> * as if we have no connector we never setup a vcpi */
> drm_dp_port_teardown_pdt(port, port->pdt);
> + port->pdt = DP_PEER_DEVICE_NONE;
And naturally I forgot to amend the commit message w.r.t. this guy.
We don't really need to do this here, but I figured I'd try to be a
bit more consistent by having it, just to avoid accidental mistakes
if/when someone changes this stuff again later.
> }
> kfree(port);
> }
> @@ -2919,6 +2920,7 @@ static void drm_dp_destroy_connector_work(struct work_struct *work)
> mgr->cbs->destroy_connector(mgr, port->connector);
>
> drm_dp_port_teardown_pdt(port, port->pdt);
> + port->pdt = DP_PEER_DEVICE_NONE;
>
> if (!port->input && port->vcpi.vcpi > 0) {
> drm_dp_mst_reset_vcpi_slots(mgr, port);
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrj�l�
Intel OTC
next prev parent reply other threads:[~2016-10-26 13:35 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 9:05 [PATCH 0/4] drm: Fix MST oopses in fbdev restore ville.syrjala
2016-10-26 9:05 ` [PATCH 1/4] drm/fb-helper: Fix connector ref leak on error ville.syrjala
2016-10-26 9:48 ` Chris Wilson
2016-10-26 9:48 ` Chris Wilson
2016-10-26 9:05 ` [PATCH 2/4] drm/fb-helper: Keep references for the current set of used connectors ville.syrjala
2016-10-26 9:05 ` ville.syrjala
2016-10-26 9:52 ` Chris Wilson
2016-10-26 9:52 ` Chris Wilson
2016-10-26 12:34 ` Ville Syrjälä
2016-10-26 12:34 ` Ville Syrjälä
2016-10-26 13:31 ` [PATCH v2 " ville.syrjala
2016-10-26 13:54 ` Chris Wilson
2016-10-26 13:54 ` Chris Wilson
2016-10-26 14:11 ` Ville Syrjälä
2016-10-26 14:11 ` Ville Syrjälä
2016-10-26 14:41 ` [PATCH v3 " ville.syrjala
2016-10-26 14:41 ` ville.syrjala
2016-10-26 9:05 ` [PATCH 3/4] drm/dp/mst: Clear port->pdt when tearing down the i2c adapter ville.syrjala
2016-10-26 9:05 ` ville.syrjala
2016-10-26 12:53 ` Daniel Vetter
2016-10-26 12:53 ` Daniel Vetter
2016-10-26 13:02 ` Ville Syrjälä
2016-10-26 13:02 ` Ville Syrjälä
2016-10-26 13:30 ` [PATCH v2 " ville.syrjala
2016-10-26 13:30 ` ville.syrjala
2016-10-26 13:35 ` Ville Syrjälä [this message]
2016-10-26 13:35 ` Ville Syrjälä
2016-10-26 14:02 ` Daniel Vetter
2016-10-26 14:02 ` Daniel Vetter
2016-10-26 16:54 ` Daniel Vetter
2016-10-26 16:54 ` Daniel Vetter
2016-10-26 14:46 ` [PATCH v3 " ville.syrjala
2016-10-26 14:46 ` ville.syrjala
2016-10-26 9:05 ` [PATCH 4/4] drm/dp/mst: Check peer device type before attempting EDID read ville.syrjala
2016-10-26 12:55 ` Daniel Vetter
2016-10-26 12:55 ` Daniel Vetter
2016-10-26 13:05 ` Ville Syrjälä
2016-10-26 13:05 ` Ville Syrjälä
2016-10-26 18:31 ` Carlos Santa
2016-10-26 18:31 ` Carlos Santa
2016-10-26 18:45 ` Ville Syrjälä
2016-10-26 18:45 ` Ville Syrjälä
2016-10-26 13:38 ` [PATCH 0/4] drm: Fix MST oopses in fbdev restore Ville Syrjälä
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=20161026133550.GF4617@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=carlos.santa@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kirill@shutemov.name \
--cc=stable@vger.kernel.org \
/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.