All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: dri-devel@lists.freedesktop.org
Cc: Jyri Sarha <jsarha@ti.com>,
	peter.ujfalusi@ti.com, tomi.valkeinen@ti.com,
	laurent.pinchart@ideasonboard.com
Subject: [PATCH v2 0/5] drm/tilcdc: Fix cpufreq transition related race + cleanup
Date: Tue, 6 Sep 2016 23:59:20 +0300	[thread overview]
Message-ID: <cover.1473195205.git.jsarha@ti.com> (raw)

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 (5):
  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: 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(-)

-- 
1.9.1

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

             reply	other threads:[~2016-09-06 20:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 20:59 Jyri Sarha [this message]
2016-09-06 20:59 ` [PATCH v2 1/5] drm/tilcdc: Take crtc modeset lock while updating the crtc clock rate Jyri Sarha
2016-09-06 20:59 ` [PATCH v2 2/5] drm/tilcdc: Clean up LCDC functional clock rate setting code Jyri Sarha
2016-09-06 20:59 ` [PATCH v2 3/5] drm/tilcdc: Flush flip-work workqueue before drm_flip_work_cleanup() Jyri Sarha
2016-09-06 20:59 ` [PATCH v2 4/5] drm/tilcdc: Remove unnecessary tilcdc_crtc_disable() from tilcdc_unload() Jyri Sarha
2016-09-06 20:59 ` [PATCH v2 5/5] drm/tilcdc: WARN if CRTC is touched without CRTC lock Jyri Sarha
2016-09-07  8:09   ` Tomi Valkeinen

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=cover.1473195205.git.jsarha@ti.com \
    --to=jsarha@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=tomi.valkeinen@ti.com \
    /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 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.