[PATCH 0/3] drm/tilcdc: Fix cpufreq transition related race + cleanup

Jyri Sarha jsarha at ti.com
Tue Sep 6 08:19:38 UTC 2016


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



More information about the dri-devel mailing list