All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/tilcdc: Fix cpufreq transition related race + cleanup
@ 2016-09-06  8:19 Jyri Sarha
  2016-09-06  8:19 ` [PATCH 1/3] drm/tilcdc: Take mode config lock while updating the crtc clock rate Jyri Sarha
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jyri Sarha @ 2016-09-06  8:19 UTC (permalink / raw)
  To: dri-devel; +Cc: Jyri Sarha, peter.ujfalusi, tomi.valkeinen, laurent.pinchart

There was a race between mode_set_nofb() and cpufreq_transition()
calling tilcdc_crtc_update_clk() without locking.

The first patch fixes the race in with a minimal change by taking
drm_mode_config mutex for the duration of the clock update.

The second patch goes a step forward and cleans up the clock setting
code a bit.

The third patch should not really be needed, for now. However,
tilcdc_crtc_enable() and -disable() are called from all over the place
and relying on drm to only do one thing at the time may not work
forever. Adding one mutex does not cost too much after all.

BR,
Jyri

Jyri Sarha (3):
  drm/tilcdc: Take mode config lock while updating the crtc clock rate
  drm/tilcdc: Add tilcdc_crtc_set_clk() and cleanup cpufreq_transition()
  drm/tilcdc: Add mutex to protect crtc enable and disable routines

 drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 93 +++++++++++++++++++++++-------------
 drivers/gpu/drm/tilcdc/tilcdc_drv.c  | 11 ++---
 drivers/gpu/drm/tilcdc/tilcdc_drv.h  |  3 +-
 3 files changed, 65 insertions(+), 42 deletions(-)

-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-09-06 12:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-06  8:19 [PATCH 0/3] drm/tilcdc: Fix cpufreq transition related race + cleanup Jyri Sarha
2016-09-06  8:19 ` [PATCH 1/3] drm/tilcdc: Take mode config lock while updating the crtc clock rate Jyri Sarha
2016-09-06  9:07   ` Tomi Valkeinen
2016-09-06 12:07     ` Jyri Sarha
2016-09-06  8:19 ` [PATCH 2/3] drm/tilcdc: Add tilcdc_crtc_set_clk() and cleanup cpufreq_transition() Jyri Sarha
2016-09-06  9:46   ` Tomi Valkeinen
2016-09-06  9:48   ` Tomi Valkeinen
2016-09-06  8:19 ` [PATCH 3/3] drm/tilcdc: Add mutex to protect crtc enable and disable routines Jyri Sarha
2016-09-06  9:30   ` Tomi Valkeinen
2016-09-06 12:09     ` Jyri Sarha

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.