Skip to content

drm/tilcdc: Fix cpufreq transition related race + cleanu

Jyri Sarha dri-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 1 replyIn review
  2. v25 patches 1 replySuperseded
  3. v13 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- Fix typo from "drm/tilcdc: Clean up LCDC functional clock rate setting code" description
- Split "drm/tilcdc: Take CRTC lock when calling tilcdc_crtc_disable()" out of "drm/tilcdc: WARN if CRTC is touched without CRTC lock"

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6drm/tilcdc: Take crtc modeset lock while updating the crtc clock ratedrivers/gpu/drm/tilcdc/tilcdc_drv.c+3 -00 replies
2/6drm/tilcdc: Clean up LCDC functional clock rate setting codedrivers/gpu/drm/tilcdc/tilcdc_crtc.c drivers/gpu/drm/tilcdc/tilcdc_drv.c drivers/gpu/drm/tilcdc/tilcdc_drv.h+47 -420 replies
3/6drm/tilcdc: Flush flip-work workqueue before drm_flip_work_cleanup()drivers/gpu/drm/tilcdc/tilcdc_crtc.c+4 -00 replies
4/6drm/tilcdc: Remove unnecessary tilcdc_crtc_disable() from tilcdc_unload()drivers/gpu/drm/tilcdc/tilcdc_drv.c+0 -20 replies
5/6drm/tilcdc: Take CRTC lock when calling tilcdc_crtc_disable()drivers/gpu/drm/tilcdc/tilcdc_crtc.c+2 -00 replies
6/6drm/tilcdc: WARN if CRTC is touched without CRTC lockdrivers/gpu/drm/tilcdc/tilcdc_crtc.c+8 -00 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchTomi Valkeinen
SeriesR-b
1/6
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/6] drm/tilcdc: Fix cpufreq transition related race + cleanu

Changes since v2:
- Fix typo from "drm/tilcdc: Clean up LCDC functional clock rate setting code" description
- Split "drm/tilcdc: Take CRTC lock when calling tilcdc_crtc_disable()" out of "drm/tilcdc: WARN if CRTC is touched without CRTC lock"

Changes since v1:
- Use drm_modeset_lock/unlock_crtc() instead of taking mode config mutex
- Rewrote decsription for old "drm/tilcdc: Add tilcdc_crtc_set_clk() and cleanup cpufreq_transition()" which now called "drm/tilcdc: Clean up LCDC functional clock rate setting code"
- Dropped "drm/tilcdc: Add mutex to protect crtc enable and disable routines"
- Added "drm/tilcdc: Flush flip-work workqueue before drm_flip_work_cleanup()"
- Added "drm/tilcdc: Remove unnecessary tilcdc_crtc_disable() from tilcdc_unload()"
- Added "drm/tilcdc: WARN if CRTC is touched without CRTC lock"

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 the drm CRTC lock for the duration of the clock update.

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

BR,
Jyri

Jyri Sarha (6):
drm/tilcdc: Take crtc modeset lock while updating the crtc clock rate drm/tilcdc: Clean up LCDC functional clock rate setting code drm/tilcdc: Flush flip-work workqueue before drm_flip_work_cleanup() drm/tilcdc: Remove unnecessary tilcdc_crtc_disable() from
tilcdc_unload()
drm/tilcdc: Take CRTC lock when calling tilcdc_crtc_disable() drm/tilcdc: WARN if CRTC is touched without CRTC lock

 drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 91 +++++++++++++++++++++++-------------
 drivers/gpu/drm/tilcdc/tilcdc_drv.c  | 12 ++---
 drivers/gpu/drm/tilcdc/tilcdc_drv.h  |  1 -
 3 files changed, 62 insertions(+), 42 deletions(-)
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel