From patchwork Tue May 24 16:12:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 9133873 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DDEF2607D3 for ; Tue, 24 May 2016 16:13:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D17761FF10 for ; Tue, 24 May 2016 16:13:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5C5A28258; Tue, 24 May 2016 16:13:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8DCF1FF10 for ; Tue, 24 May 2016 16:13:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3FAE789C03; Tue, 24 May 2016 16:13:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id F1D2789C03 for ; Tue, 24 May 2016 16:13:22 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id f75so7625588wmf.2 for ; Tue, 24 May 2016 09:13:22 -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; bh=N9Qyl4gnOES0MURLPbqOPyiFIfyfxrCfJ/3x1rQPMYA=; b=S/ImdalvR/H/Hv6VAye087Q4SJrqVdAJQwA9LqSgvKVk0bSrefb/Rgx/qUCEleFKz4 ZcGjPNa2ZurHulZThhgZUvtc0vYtGgRmR1A3muandRngI+XTNIG88PBnXKlv02N8YoGv U3RL4grLYI2Xp9yjBU/CM2lk0ty0I/vrlRtJHXR6nng/Zblmm5vBVu5vtzecSjVbZsI2 FCa+vgIbZ1f76TR4RAR1jEUnxQHgTO/7ozvjQ9Mw69FA4eDu7pb7XhyFEAVoaHNAXV5K mFUCZfpmvxULXoQQe2JYYTq6J0NoXJlAT1g8vYiK2oJhPnjEC9k+jW+dbw9CJvUgfi38 DOiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=N9Qyl4gnOES0MURLPbqOPyiFIfyfxrCfJ/3x1rQPMYA=; b=FMWaeHya4GHfjFwohosWTq8swLMAoneNSLVSbYp3/Zk1B+3ufHUQgHc/TwaHsUsE/r HwevAjm4iHpSl8qxC3NSzPj06fw8rsf4Jew5QPmx6ttUXibiDZIyJVwDOt+TxJA6jL2D OY5a2TR+EufD1cacUHPg5pK7CGFopyAcBn5UPuKNRCsgzPR4zbW/OxPkRMWglJVP9t3U s0mp9vFob8W/XbzyInjmS4aMIQC4SlPLrqagMo67XrIkGIx4f2SgvLFN1V7u3R1QFyDI TPoClD29y89t1aUwybZ0OaI5I0sdoFJwUnUtUPy8QJeB2Vuy6qjIf/3Ao1uWyzwWGxLU inqQ== X-Gm-Message-State: ALyK8tIn5Qd3xpMkhZPzi8v+4PLmRo3/CrUMbsqhCt7xCAfVoXCgVO7RrCz116t31A1ntA== X-Received: by 10.194.119.195 with SMTP id kw3mr5028922wjb.166.1464106401090; Tue, 24 May 2016 09:13:21 -0700 (PDT) Received: from twisty.fritz.box (x5f71ab1b.dyn.telefonica.de. [95.113.171.27]) by smtp.gmail.com with ESMTPSA id kq9sm3980113wjc.26.2016.05.24.09.13.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 May 2016 09:13:20 -0700 (PDT) From: Mario Kleiner To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: Fix hdmi deep color support. Date: Tue, 24 May 2016 18:12:43 +0200 Message-Id: <1464106363-6369-1-git-send-email-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 2.7.0 Cc: Alex Deucher , stable@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP When porting the hdmi deep color detection code from radeon-kms to amdgpu-kms apparently some kind of copy and paste error happened, attaching an else branch to the wrong if statement. The result is that hdmi deep color mode is always disabled, regardless of gpu and display capabilities and user wishes, as the code mistakenly thinks that the display doesn't provide the required max_tmds_clock limit and falls back to 8 bpc. This patch fixes deep color support, as tested on a R9 380 Tonga Pro + suitable display, and should be backported to all kernels with amdgpu-kms support. Signed-off-by: Mario Kleiner Cc: stable@vger.kernel.org Cc: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c index 60a0c9a..cb07da4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c @@ -194,12 +194,12 @@ int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector) bpc = 8; DRM_DEBUG("%s: HDMI deep color 10 bpc exceeds max tmds clock. Using %d bpc.\n", connector->name, bpc); - } else if (bpc > 8) { - /* max_tmds_clock missing, but hdmi spec mandates it for deep color. */ - DRM_DEBUG("%s: Required max tmds clock for HDMI deep color missing. Using 8 bpc.\n", - connector->name); - bpc = 8; } + } else if (bpc > 8) { + /* max_tmds_clock missing, but hdmi spec mandates it for deep color. */ + DRM_DEBUG("%s: Required max tmds clock for HDMI deep color missing. Using 8 bpc.\n", + connector->name); + bpc = 8; } }