From: Harry Wentland <hwentlan@amd.com>
To: "David (Dingchen) Zhang" <dingchen.zhang@amd.com>,
dri-devel@lists.freedesktop.org
Cc: Nick Kazlauskas <Nicholas.Kazlauskas@amd.com>
Subject: Re: [PATCH v3] drm: Set crc->opened to false before setting crc source to NULL.
Date: Thu, 2 Jan 2020 10:47:36 -0500 [thread overview]
Message-ID: <1559adc4-50d5-ecb2-a05d-44925b998682@amd.com> (raw)
In-Reply-To: <20190726173743.11641-1-dingchen.zhang@amd.com>
On 2019-07-26 1:37 p.m., David (Dingchen) Zhang wrote:
> From: Dingchen Zhang <dingchen.zhang@amd.com>
>
> to terminate the while-loop in drm_dp_aux_crc_work when
> drm_dp_start/stop_crc are called in the hook to set crc source.
>
> v3: set crc->opened to false without checking (Nick)
> v2: Move spin_lock around entire crc->opened use (Daniel)
>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Harry Wentland <Harry.Wentland@amd.com>
> Cc: Nick Kazlauskas <Nicholas.Kazlauskas@amd.com>
> Signed-off-by: Dingchen Zhang <dingchen.zhang@amd.com>
Looks like we dropped the ball on this and the other CRC patch. I'll
merge them now.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/drm_debugfs_crc.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c
> index dac267e840af..d2d2389d8892 100644
> --- a/drivers/gpu/drm/drm_debugfs_crc.c
> +++ b/drivers/gpu/drm/drm_debugfs_crc.c
> @@ -249,6 +249,11 @@ static int crtc_crc_release(struct inode *inode, struct file *filep)
> struct drm_crtc *crtc = filep->f_inode->i_private;
> struct drm_crtc_crc *crc = &crtc->crc;
>
> + /* terminate the infinite while loop if 'drm_dp_aux_crc_work' running */
> + spin_lock_irq(&crc->lock);
> + crc->opened = false;
> + spin_unlock_irq(&crc->lock);
> +
> crtc->funcs->set_crc_source(crtc, NULL);
>
> spin_lock_irq(&crc->lock);
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2020-01-02 15:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-26 17:37 [PATCH v3] drm: Set crc->opened to false before setting crc source to NULL David (Dingchen) Zhang
2020-01-02 15:47 ` Harry Wentland [this message]
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=1559adc4-50d5-ecb2-a05d-44925b998682@amd.com \
--to=hwentlan@amd.com \
--cc=Nicholas.Kazlauskas@amd.com \
--cc=dingchen.zhang@amd.com \
--cc=dri-devel@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox