lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 15 Oct 2014 14:32:38 +0900
From:	Inki Dae <inki.dae@...sung.com>
To:	Andrzej Hajda <a.hajda@...sung.com>
Cc:	Joonyoung Shim <jy0922.shim@...sung.com>,
	Seung-Woo Kim <sw0312.kim@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	David Airlie <airlied@...ux.ie>,
	Kukjin Kim <kgene.kim@...sung.com>,
	dri-devel@...ts.freedesktop.org, linux-samsung-soc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/exynos: fix vblank handling during dpms off

On 2014년 10월 10일 21:39, Andrzej Hajda wrote:
> On 10/02/2014 12:52 PM, Inki Dae wrote:
>> On 2014년 10월 02일 17:58, Joonyoung Shim wrote:
>>> Hi Andrzej,
>>>
>>> On 10/01/2014 05:14 PM, Andrzej Hajda wrote:
>>>> The patch disables vblanks during dpms off only if pagefilp has
>>>> not been finished. It also replaces drm_vblank_off with drm_crtc_vblank_put.
>>>> It fixes issue with page_flip ioctl not being able to acquire vblank counter.
>>> This problem isn't related with pageflip, it just causes from
>>> 7ffd7a68511c710b84db3548a1997fd2625f580a commit (drm: Always reject
>>> drm_vblank_get() after drm_vblank_off()).
>>>
>>> We need to use drm_vblank_on() as a counterpart to drm_vblank_off()
>>> after the commit .
>>>
>>> How about below patch?
>> Thanks you Joonyoung and Andrzej,
>>
>> drm_vblank_on/off() are legacy api so it would be better to use
>> drm_vblank_crtc_on/off functions instead.
>>
>> And drm_vblank_crtc_off() makes sure that the latest vblank frame count
>> is stored and restored by drm_vblank_crtc_on() again. So my opinion is,
>>
>> static void exynos_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
>> {
>> 	[snip]
>>
>> 	if (mode > DRM_MODE_DPMS_ON) {
>> 		/* wait for the completion of page flip. */
>> 		if (!wait_event_timeout(exynos_crtc->pending_flip_queue,
>> 				!atomic_read(&exynos_crtc->pending_flip),
>> 				HZ/20))
>> 			atomic_set(&exynos_crtc->pending_flip, 0);
>> 		drm_crtc_vblank_off(crtc);		//<- store the latest vblank frame count.
>> 	} else {
>> 		drm_crtc_vblank_on(crtc);		//<- restore the vblank frame count.
>> 	}
>>
>> 	[snip]
>> }
>>
>>
>> Tested and worked well with above patch. How about it?
>>
>>
> 
> drm_crtc_vblank_on should be called after dpms on, otherwise it can fail enabling vblank. I have provided
> full explanation in my other email [1].
> You can modify your patch or just use the one provided in [1].

I will just merge your patch set after review and test. :)

Thanks,
Inki Dae

> 
> [1]: http://permalink.gmane.org/gmane.comp.video.dri.devel/116152
> 
> Regards
> Andrzej
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ