From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrzej Hajda Subject: Re: [PATCH v4 21/34] drm/exynos: Use mode_set to configure fimd Date: Mon, 10 Feb 2014 11:36:00 +0100 Message-ID: <52F8AB90.1040804@samsung.com> References: <1391116773-28471-1-git-send-email-seanpaul@chromium.org> <1391116773-28471-22-git-send-email-seanpaul@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailout4.w1.samsung.com (mailout4.w1.samsung.com [210.118.77.14]) by gabe.freedesktop.org (Postfix) with ESMTP id 96A5AFA27A for ; Mon, 10 Feb 2014 02:36:29 -0800 (PST) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N0S002IH04P4C40@mailout4.w1.samsung.com> for dri-devel@lists.freedesktop.org; Mon, 10 Feb 2014 10:36:25 +0000 (GMT) In-reply-to: <1391116773-28471-22-git-send-email-seanpaul@chromium.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Sean Paul , dri-devel@lists.freedesktop.org, inki.dae@samsung.com Cc: marcheu@chromium.org List-Id: dri-devel@lists.freedesktop.org Hi Sean, On 01/30/2014 10:19 PM, Sean Paul wrote: > This patch uses the mode passed into mode_set to configure fimd instead > of directly using the panel from context. This will allow us to move > the exynos_drm_display implementation out of fimd, where it doesn't > belong. > > Signed-off-by: Sean Paul (...) > + vblank = mode->crtc_vblank_end - mode->crtc_vblank_start; > + vsync_len = mode->crtc_vsync_end - mode->crtc_vsync_start; > + vbpd = (vblank - vsync_len) / 2; > + vfpd = vblank - vsync_len - vbpd; It should be rather: vbpd = mode->crtc_vtotal - mode->crtc_vsync_end; vfpd = mode->crtc_vsync_start - mode->crtc_vdisplay; > + > + val = VIDTCON0_VBPD(vbpd - 1) | > + VIDTCON0_VFPD(vfpd - 1) | > + VIDTCON0_VSPW(vsync_len - 1); > writel(val, ctx->regs + driver_data->timing_base + VIDTCON0); > > /* setup horizontal timing values. */ > - val = VIDTCON1_HBPD(vm->hback_porch - 1) | > - VIDTCON1_HFPD(vm->hfront_porch - 1) | > - VIDTCON1_HSPW(vm->hsync_len - 1); > + hblank = mode->crtc_hblank_end - mode->crtc_hblank_start; > + hsync_len = mode->crtc_hsync_end - mode->crtc_hsync_start; > + hbpd = (hblank - hsync_len) / 2; > + hfpd = hblank - hsync_len - hbpd; hbpd = mode->crtc_htotal - mode->crtc_hsync_end; hfpd = mode->crtc_hsync_start - mode->crtc_hdisplay; I have pointed it out already in my exynos/dsi patches[1](they were based on v3 of your patches), but I forgot to cc it to you. [1] http://permalink.gmane.org/gmane.comp.video.dri.devel/98737 Regards Andrzej