From patchwork Tue Oct 23 20:30:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 1633461 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 41FB23FD85 for ; Tue, 23 Oct 2012 20:37:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2208A9F76F for ; Tue, 23 Oct 2012 13:37:22 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yh0-f49.google.com (mail-yh0-f49.google.com [209.85.213.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 59DC49F75B for ; Tue, 23 Oct 2012 13:30:45 -0700 (PDT) Received: by mail-yh0-f49.google.com with SMTP id j52so813033yhj.36 for ; Tue, 23 Oct 2012 13:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=3hJlAPku3FckuIZuU31mdOetfSNTsHuqNz2ut/NSh18=; b=VTNNTpZMZTL/c5TYoh3WfbmY4DMgne8IbxlueHNIVYoTS1hZkehVLCkiDPUQ2gfmjL bU0Zhtmps7P7XtSTOSzmuiuqpiSwnlMFMriHCOCPEJcG/HED6t7MCdVGEBGCRLqhMRR8 mWEFY7Hnlof9S4B+Ao5VWNPR47aGF1mGxWImpWPdNGfZPxhUSqBfMQELq1Pfd7TbJPGp YtHmRVcmaoniRpT8fCusGUeuVmvhB+M6RLdhEaaJJsW01VtMRsMr0XszVgRlcIfKmk8G n4eOi74Xwj5hPC+mMwe8hKgu+GiXqTocgOjBxOcWZ83afrBQw9U5vPHCu52dlKiAZqy8 vU6g== Received: by 10.236.129.12 with SMTP id g12mr3515492yhi.77.1351024245227; Tue, 23 Oct 2012 13:30:45 -0700 (PDT) Received: from vicky.domain.invalid ([177.40.46.113]) by mx.google.com with ESMTPS id a44sm12892049yhe.21.2012.10.23.13.30.43 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 23 Oct 2012 13:30:44 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 23 Oct 2012 18:30:03 -0200 Message-Id: <1351024208-3489-14-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1351024208-3489-1-git-send-email-przanoni@gmail.com> References: <1351024208-3489-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 13/18] drm/i915: implement workaround for VTOTAL when using TRANSCODER_EDP X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org From: Paulo Zanoni See the documentation for the DDI_FUNC_CTL register, EDP Input Select bits: when the EDP input selection is B, the VTOTAL_B must be programmed with the VTOTAL_EDP value, same thing for selection C. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_display.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 1b72f36..b7e7814 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4524,6 +4524,17 @@ static void intel_set_pipe_timings(struct intel_crtc *intel_crtc, (adjusted_mode->crtc_vsync_start - 1) | ((adjusted_mode->crtc_vsync_end - 1) << 16)); + /* Workaround: when the EDP input selection is B, the VTOTAL_B must be + * programmed with the VTOTAL_EDP value. Same for VTOTAL_C. This is + * documented on the DDI_FUNC_CTL register description, EDP Input Select + * bits. */ + if (IS_HASWELL(dev) && cpu_transcoder == TRANSCODER_EDP && + (pipe == PIPE_B || pipe == PIPE_C)) { + I915_WRITE(VTOTAL(pipe), + (adjusted_mode->crtc_vdisplay - 1) | + ((adjusted_mode->crtc_vtotal - 1) << 16)); + } + /* pipesrc controls the size that is scaled from, which should * always be the user's requested size. */