From patchwork Wed Oct 24 13:34:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 1638441 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 31F65DF2AB for ; Wed, 24 Oct 2012 13:34:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F384A0271 for ; Wed, 24 Oct 2012 06:34:58 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-gh0-f177.google.com (mail-gh0-f177.google.com [209.85.160.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 119C59E74B for ; Wed, 24 Oct 2012 06:34:47 -0700 (PDT) Received: by mail-gh0-f177.google.com with SMTP id f20so63453ghb.36 for ; Wed, 24 Oct 2012 06:34:47 -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=ud2GuJVmct7nNyKnhEnEr7xYpp+gYSv9V9PnE9DGiL0=; b=jw2oQlKbaRV+/jCsWH9M2ow0khI0y6HTsWaTn5S3loG3skfaKpmOHYoV6sKDHhs4FE DPIAAdG5+VKNTmlR7y5eJ1alE11TboE+Sdsw9qkVImAToq5FMWcHpR8+NgoeQRR8yCMU ubyUaUqc0+GktAfbNDnP8a/78L93d5yb2cII+jzTzYdV2gfXImp/IueS3pJ264+xzUUH befE4L6ODIeiuZhU40kR7T4UaULf1ARx/i/hHMPJUOhyy4PlyKL+w1HYFSMsxRhd/Ck1 UPsFkPSnO646j1uC09D5kvDb9qL1lEqjfpXaxTYQmSB2+bqPJDVKKbkvLEpzi3BC6rzo ylIw== Received: by 10.236.116.194 with SMTP id g42mr2122582yhh.83.1351085687449; Wed, 24 Oct 2012 06:34:47 -0700 (PDT) Received: from vicky.domain.invalid ([177.42.14.236]) by mx.google.com with ESMTPS id l35sm14779884yhi.12.2012.10.24.06.34.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 24 Oct 2012 06:34:46 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Wed, 24 Oct 2012 11:34:43 -0200 Message-Id: <1351085683-3649-1-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1351024208-3489-14-git-send-email-przanoni@gmail.com> References: <1351024208-3489-14-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. V2: Use I915_READ as suggested by Daniel Vetter. Signed-off-by: Paulo Zanoni Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/intel_display.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 1b72f36..8379e12 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4524,6 +4524,14 @@ 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), I915_READ(VTOTAL(cpu_transcoder))); + /* pipesrc controls the size that is scaled from, which should * always be the user's requested size. */