lkml.org 
[lkml]   [2020]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] drm/ingenic: Reset pixclock rate when parent clock rate changes
From
Date
Quoting Paul Cercueil (2020-09-25 05:29:12)
> >> +static int ingenic_drm_update_pixclk(struct notifier_block *nb,
> >> + unsigned long action,
> >> + void *data)
> >> +{
> >> + struct ingenic_drm *priv = drm_nb_get_priv(nb);
> >> +
> >> + switch (action) {
> >> + case PRE_RATE_CHANGE:
> >> + mutex_lock(&priv->clk_mutex);
> >> + priv->update_clk_rate = true;
> >> + drm_crtc_wait_one_vblank(&priv->crtc);
> >> + return NOTIFY_OK;
> >> + default:
> >> + mutex_unlock(&priv->clk_mutex);
> > Any risk the POST_RATE_CHANGE or ABORT_RATE_CHANGE may go missing so
> > we
> > fail to unlock the mutex?
> > I think not but wanted to make sure you had thought about it.
>
> My assumption was that you always get POST_RATE_CHANGE or
> ABORT_RATE_CHANGE. But I am not 100% sure about that.
>
> Michael, Stephen: is it safe to assume that I will always get notified
> with POST_RATE_CHANGE or ABORT_RATE_CHANGE, after I got notified with
> PRE_RATE_CHANGE?
>

I think one or the other will happen. Of course, the notifiers are sort
of shunned so if you can avoid using notifiers entirely it would be
better.

\
 
 \ /
  Last update: 2020-10-14 01:18    [W:0.114 / U:1.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site