Re: [PATCH] drm/exynos: Fix disharmony when setting plane on/off

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

 



Hi,

On 02/03/2015 10:41 PM, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
> 
> This issue was caused by the latest exynos_update_plane() clean up
> that unified plane operations. After those changes the plane failed
> to go the On state. This patch fix this problem by doing correct account
> of exynos_crtc->enabled.
> 
> Signed-off-by: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_crtc.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> index a85c451..1dbd0e3 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> @@ -119,6 +119,7 @@ static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
>  	struct drm_framebuffer *fb = crtc->primary->fb;
>  	unsigned int crtc_w;
>  	unsigned int crtc_h;
> +	int ret;
>  
>  	/* when framebuffer changing is requested, crtc's dpms should be on */
>  	if (exynos_crtc->dpms > DRM_MODE_DPMS_ON) {
> @@ -129,8 +130,15 @@ static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
>  	crtc_w = fb->width - x;
>  	crtc_h = fb->height - y;
>  
> -	return exynos_update_plane(crtc->primary, crtc, fb, 0, 0,
> -				   crtc_w, crtc_h, x, y, crtc_w, crtc_h);
> +	ret = exynos_update_plane(crtc->primary, crtc, fb, 0, 0,
> +				  crtc_w, crtc_h, x, y, crtc_w, crtc_h);
> +	if (!ret)
> +		return ret;
> +
> +	exynos_plane_dpms(crtc->primary, DRM_MODE_DPMS_ON);
> +
> +	return 0;
> +
>  }
>  
>  static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
> 

This patch fails to fix disharmony problem of plane on/off because it
causes the problem when do setplane.

Please test setplane like below and i get errors when terminate it.

Thanks.

# modetest -P 24:1920x1080
trying to open device 'i915'...failed.
trying to open device 'radeon'...failed.
trying to open device 'nouveau'...failed.
trying to open device 'vmwgfx'...failed.
trying to open device 'omapdrm'...failed.
trying to open device 'exynos'...success.
testing 1920x1080@XR24 overlay plane 17

[   33.766264] PAGE FAULT occurred at 0x20801e80 by 14650000.sysmmu(Page table base: 0x6e3f0000)
[   33.773310]  Lv1 entry: 0x6e228801
[   33.776748] ------------[ cut here ]------------
[   33.781283] kernel BUG at drivers/iommu/exynos-iommu.c:358!
[   33.786829] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[   33.792634] Modules linked in:
[   33.795672] CPU: 0 PID: 1561 Comm: modetest Not tainted 3.19.0-rc7-00692-g9630be0 #112
[   33.803551] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[   33.809620] task: ed4a5400 ti: ed84c000 task.ti: ed84c000
[   33.815002] PC is at exynos_sysmmu_irq+0x180/0x204
[   33.819758] LR is at exynos_sysmmu_irq+0xd4/0x204
[   33.824439] pc : [<c0298b74>]    lr : [<c0298ac8>]    psr: 60000193
[   33.824439] sp : ed84dce0  ip : 00000000  fp : 000b9e4d
[   33.835875] r10: c07ae3a4  r9 : 00000208  r8 : 20801e80
[   33.841074] r7 : ee3f0000  r6 : ee0df128  r5 : ee0df110  r4 : 00000000
[   33.847574] r3 : 6e228801  r2 : 6e228801  r1 : ee379610  r0 : ee13a500
[   33.854074] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   33.861265] Control: 10c5387d  Table: 6e14c06a  DAC: 00000015
[   33.866984] Process modetest (pid: 1561, stack limit = 0xed84c238)
[   33.873136] Stack: (0xed84dce0 to 0xed84e000)
...
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://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