Re: [PATCH 1/3] drm/tilcdc: Take mode config lock while updating the crtc clock rate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 06/09/16 11:19, Jyri Sarha wrote:
> Take mode config lock while updating the crtc clock rate. To avoid a
> race in tilcdc_crtc_update_clk(), we do not want the mode to change
> while we update crtc clock.
> 
> Signed-off-by: Jyri Sarha <jsarha@xxxxxx>
> ---
>  drivers/gpu/drm/tilcdc/tilcdc_drv.c | 5 +++++
>  drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 ++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> index f8892e9..882d9b5 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> @@ -184,10 +184,14 @@ static int cpufreq_transition(struct notifier_block *nb,
>  {
>  	struct tilcdc_drm_private *priv = container_of(nb,
>  			struct tilcdc_drm_private, freq_transition);
> +	struct drm_mode_config *config = &priv->dev->mode_config;
> +
>  	if (val == CPUFREQ_POSTCHANGE) {
>  		if (priv->lcd_fck_rate != clk_get_rate(priv->clk)) {
> +			mutex_lock(&config->mutex);

drm_modeset_lock_crtc()? Or drm_modeset_lock_all() if per-crtc is not
suitable.

 Tomi

Attachment: signature.asc
Description: OpenPGP digital signature

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

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux