All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
	hudson@trmm.net, markus@raatikainen.cc,
	Sam Ravnborg <sam@ravnborg.org>,
	USB list <linux-usb@vger.kernel.org>,
	Tyler Hardin <th020394@gmail.com>,
	Lubomir Rintel <lkundrak@v3.sk>,
	pontus.fuchs@gmail.com, peter@stuge.se
Subject: Re: [PATCH v4 2/3] drm/probe-helper: Check epoch counter in output_poll_execute()
Date: Wed, 20 Jan 2021 18:41:56 +0100	[thread overview]
Message-ID: <CAKMK7uF62TrWhqBMM6qa+nXbKEs=sEGw6eF62S_NfTanyXc_Xg@mail.gmail.com> (raw)
In-Reply-To: <20210120170033.38468-3-noralf@tronnes.org>

On Wed, Jan 20, 2021 at 6:10 PM Noralf Trønnes <noralf@tronnes.org> wrote:
>
> drm_helper_hpd_irq_event() checks the epoch counter to determine
> connector status change. This was introduced in
> commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector").
> Do the same for output_poll_execute() so it can detect other changes
> beside connection status value changes.
>
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> ---
>  drivers/gpu/drm/drm_probe_helper.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index d6017726cc2a..e5432dcf6999 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -623,6 +623,7 @@ static void output_poll_execute(struct work_struct *work)
>         struct drm_connector_list_iter conn_iter;
>         enum drm_connector_status old_status;
>         bool repoll = false, changed;
> +       u64 old_epoch_counter;
>
>         if (!dev->mode_config.poll_enabled)
>                 return;
> @@ -659,8 +660,9 @@ static void output_poll_execute(struct work_struct *work)
>
>                 repoll = true;
>
> +               old_epoch_counter = connector->epoch_counter;
>                 connector->status = drm_helper_probe_detect(connector, NULL, false);
> -               if (old_status != connector->status) {
Was about to ask whether we're not missing connector status changes
here, but that's already handled. Not sure why this wasn't done as
part of the original patch, I'd include a cc: stable here.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> +               if (old_epoch_counter != connector->epoch_counter) {
>                         const char *old, *new;
>
>                         /*
> @@ -689,6 +691,9 @@ static void output_poll_execute(struct work_struct *work)
>                                       connector->base.id,
>                                       connector->name,
>                                       old, new);
> +                       DRM_DEBUG_KMS("[CONNECTOR:%d:%s] epoch counter %llu -> %llu\n",
> +                                     connector->base.id, connector->name,
> +                                     old_epoch_counter, connector->epoch_counter);
>
>                         changed = true;
>                 }
> --
> 2.23.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: hudson@trmm.net, markus@raatikainen.cc, peter@stuge.se,
	USB list <linux-usb@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Tyler Hardin <th020394@gmail.com>,
	Lubomir Rintel <lkundrak@v3.sk>,
	pontus.fuchs@gmail.com, Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH v4 2/3] drm/probe-helper: Check epoch counter in output_poll_execute()
Date: Wed, 20 Jan 2021 18:41:56 +0100	[thread overview]
Message-ID: <CAKMK7uF62TrWhqBMM6qa+nXbKEs=sEGw6eF62S_NfTanyXc_Xg@mail.gmail.com> (raw)
In-Reply-To: <20210120170033.38468-3-noralf@tronnes.org>

On Wed, Jan 20, 2021 at 6:10 PM Noralf Trønnes <noralf@tronnes.org> wrote:
>
> drm_helper_hpd_irq_event() checks the epoch counter to determine
> connector status change. This was introduced in
> commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector").
> Do the same for output_poll_execute() so it can detect other changes
> beside connection status value changes.
>
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> ---
>  drivers/gpu/drm/drm_probe_helper.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index d6017726cc2a..e5432dcf6999 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -623,6 +623,7 @@ static void output_poll_execute(struct work_struct *work)
>         struct drm_connector_list_iter conn_iter;
>         enum drm_connector_status old_status;
>         bool repoll = false, changed;
> +       u64 old_epoch_counter;
>
>         if (!dev->mode_config.poll_enabled)
>                 return;
> @@ -659,8 +660,9 @@ static void output_poll_execute(struct work_struct *work)
>
>                 repoll = true;
>
> +               old_epoch_counter = connector->epoch_counter;
>                 connector->status = drm_helper_probe_detect(connector, NULL, false);
> -               if (old_status != connector->status) {
Was about to ask whether we're not missing connector status changes
here, but that's already handled. Not sure why this wasn't done as
part of the original patch, I'd include a cc: stable here.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> +               if (old_epoch_counter != connector->epoch_counter) {
>                         const char *old, *new;
>
>                         /*
> @@ -689,6 +691,9 @@ static void output_poll_execute(struct work_struct *work)
>                                       connector->base.id,
>                                       connector->name,
>                                       old, new);
> +                       DRM_DEBUG_KMS("[CONNECTOR:%d:%s] epoch counter %llu -> %llu\n",
> +                                     connector->base.id, connector->name,
> +                                     old_epoch_counter, connector->epoch_counter);
>
>                         changed = true;
>                 }
> --
> 2.23.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-01-20 17:52 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 17:00 [PATCH v4 0/3] Generic USB Display driver Noralf Trønnes
2021-01-20 17:00 ` Noralf Trønnes
2021-01-20 17:00 ` [PATCH v4 1/3] drm/uapi: Add USB connector type Noralf Trønnes
2021-01-20 17:00   ` Noralf Trønnes
2021-01-20 17:42   ` Daniel Vetter
2021-01-20 17:42     ` Daniel Vetter
2021-01-21  7:45     ` Thomas Zimmermann
2021-01-21  7:45       ` Thomas Zimmermann
2021-01-21  8:27       ` Daniel Vetter
2021-01-21  8:27         ` Daniel Vetter
2021-01-21  8:40         ` Simon Ser
2021-01-21  8:40           ` Simon Ser
2021-01-21 10:01         ` Thomas Zimmermann
2021-01-21 10:01           ` Thomas Zimmermann
2021-01-21 18:07           ` Noralf Trønnes
2021-01-21 18:07             ` Noralf Trønnes
2021-01-22  7:54             ` Thomas Zimmermann
2021-01-22  7:54               ` Thomas Zimmermann
2021-01-22  7:59               ` Thomas Zimmermann
2021-01-22  7:59                 ` Thomas Zimmermann
2021-01-22 11:44               ` Noralf Trønnes
2021-01-22 11:44                 ` Noralf Trønnes
2021-01-22 12:47                 ` Thomas Zimmermann
2021-01-22 12:47                   ` Thomas Zimmermann
2021-01-22 14:35                   ` Noralf Trønnes
2021-01-22 14:35                     ` Noralf Trønnes
2021-01-22 14:55                     ` Thomas Zimmermann
2021-01-22 14:55                       ` Thomas Zimmermann
2021-01-22 18:39                       ` Noralf Trønnes
2021-01-22 18:39                         ` Noralf Trønnes
2021-01-20 17:00 ` [PATCH v4 2/3] drm/probe-helper: Check epoch counter in output_poll_execute() Noralf Trønnes
2021-01-20 17:00   ` Noralf Trønnes
2021-01-20 17:41   ` Daniel Vetter [this message]
2021-01-20 17:41     ` Daniel Vetter
2021-01-20 17:00 ` [PATCH v4 3/3] drm: Add Generic USB Display driver Noralf Trønnes
2021-01-20 17:00   ` Noralf Trønnes
2021-01-20 18:02   ` Daniel Vetter
2021-01-24 16:17     ` Noralf Trønnes
2021-01-24 16:17       ` Noralf Trønnes
2021-01-21  9:59 ` [PATCH v4 0/3] " Thomas Zimmermann
2021-01-21  9:59   ` Thomas Zimmermann
2021-01-21 10:20   ` Simon Ser
2021-01-21 10:20     ` Simon Ser
2021-01-23 11:46     ` Noralf Trønnes
2021-01-23 11:46       ` Noralf Trønnes
2021-01-23 18:47 ` Lubomir Rintel
2021-01-23 18:47   ` Lubomir Rintel
2021-01-24 18:38 ` Lubomir Rintel
2021-01-24 18:38   ` Lubomir Rintel
2021-01-24 20:51   ` Noralf Trønnes
2021-01-24 20:51     ` Noralf Trønnes
2021-02-21 11:14     ` Noralf Trønnes
2021-02-21 11:14       ` Noralf Trønnes

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='CAKMK7uF62TrWhqBMM6qa+nXbKEs=sEGw6eF62S_NfTanyXc_Xg@mail.gmail.com' \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hudson@trmm.net \
    --cc=linux-usb@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=markus@raatikainen.cc \
    --cc=noralf@tronnes.org \
    --cc=peter@stuge.se \
    --cc=pontus.fuchs@gmail.com \
    --cc=sam@ravnborg.org \
    --cc=th020394@gmail.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.