linux-aspeed.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH] media: platform: Fix a kernel warning on clk control
Date: Fri, 29 Mar 2019 13:47:04 -0700	[thread overview]
Message-ID: <d91b27ce-ad96-7260-df6d-37a2fe3e89ab@linux.intel.com> (raw)
In-Reply-To: <db524edd-0c6c-2bb7-848d-2261286b4b21@linux.ibm.com>

Hi Eddie,

On 3/29/2019 1:08 PM, Eddie James wrote:
> On 3/28/19 4:25 PM, Jae Hyun Yoo wrote:
>> To prevent this issue, this commit adds spinlock protection and clock
>> status checking logic into the Aspeed video engine driver.
> 
> Thanks Jae. Do you have a reliable way to reproduce this? Haven't seen 
> it myself.

It could be observed when user space releases a video engine dev entry
handle while video mode is changing. You could reproduce it by repeating
reload of KVM web page just after trigger a host reset. It rarely
happens.

>> +??? bool is_video_on;
> 
> This can probably be a flag, like VIDEO_CLOCKS_ON, not a new boolean.

Okay, I'll add the bit field into video->flags.

>> +??????? aspeed_video_reset(video);
> I'm working on a patch to remove the use of the reset line too.

Right, since clk-aspeed module can trigger a reset while enabling the
vclk or eclk, it could be removed later, but this patch is not for that.
>> +??? spin_lock(&video->lock);
> 
> Is there a reason you're locking extra code? Why not put the lock in the 
> aspeed_video_on/off functions?

aspeed_video_on() and aspeed_video_off() can be called from driver
context and from interrupt context so some video enable/disable
relating code also need to be serialized.

Will submit v2 soon after replacing the boolean variable with 
VIDEO_CLOCKS_ON flag.

Thanks,
Jae

      reply	other threads:[~2019-03-29 20:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 21:25 [PATCH] media: platform: Fix a kernel warning on clk control Jae Hyun Yoo
2019-03-29 20:08 ` Eddie James
2019-03-29 20:47   ` Jae Hyun Yoo [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=d91b27ce-ad96-7260-df6d-37a2fe3e89ab@linux.intel.com \
    --to=jae.hyun.yoo@linux.intel.com \
    --cc=linux-aspeed@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).