From patchwork Thu Dec 12 09:07:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1208291 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jfaVv9Fi"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YSdL1wtbz9sR7; Thu, 12 Dec 2019 20:08:22 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ifKSH-00031R-Ln; Thu, 12 Dec 2019 09:08:17 +0000 Received: from mail-pf1-f196.google.com ([209.85.210.196]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ifKSD-0002wW-76 for kernel-team@lists.ubuntu.com; Thu, 12 Dec 2019 09:08:13 +0000 Received: by mail-pf1-f196.google.com with SMTP id y206so424922pfb.0 for ; Thu, 12 Dec 2019 01:08:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=Hj09Sr8swEZPmFqYhPMOM0tCe068sP6NeaxSL0/tx9I=; b=jfaVv9Fi2MGBvhCQtP5zrdSf5U1OWZDQZyPmgp8ywXir7n/m6tgBSs25OXFDD7O9xe xjI0h0sCCHYJJZZZuvP7VqPHKO4Xh62+XZnCHWJVh482GGzl0L23Zim0E5ukwOy6M8MO 2dPQSmsKyZXmA1Vx2pRfwTBbIBALb71fsSQERKMldH0qfKAEJ/uxGUd7p3RuQ/23VDTY YSZ9wUZLY87bLnbiHIXfZp4GqzRtKW9rOlqxERz1o2jxv+YuhHqdRMFylRYPtgqZT/KZ 8GQx8y0ElSkzzOs3XlGNiU3sbz4/9ElvJ2RBHB8vjCG90yo0ONVZ64Jx0am24HhuK5YV 80Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=Hj09Sr8swEZPmFqYhPMOM0tCe068sP6NeaxSL0/tx9I=; b=A4feziYDs/s9uxMKRYP4IV4FbvccPgh8FDgDmy9ypwz8cbslhOHJOastYl5KsPRn5G E5OoMN6SJjnhoKfQpg2wEf8/XdUtNMrSoufSsI89yPkLjk32FRkcdaKcw1BXXtLSiZWO 5u4VWJMOEGNa1Zz7odkR+oDXUwyAFqQecjoKquhX1Z3Fb3jD6gyXlxdtY62fM8QkW+tN AjNtQko3tJEkrSo1RHPovjhKsBre9TwlPHHK1SFiomM+/O+FhivNLDTF+MF23vuG7J6+ Y1qfDMk4lyrlUvbRIU+dpsqExCiQyBEp/cvyw55MrWAedv4q8M9rdUnyYf+u7MLdNxH4 FWEg== X-Gm-Message-State: APjAAAWwR+xryUebUqdxaiJtdwwUuvQn8ziVAYBhsMNyeBXrMr7yWSIw Jq8VAYWim9pMsMLu92nodIBZbzs1mDs= X-Google-Smtp-Source: APXvYqyxueL34SCisbWWTpAqmOf6xR5t+cw1yYm8bQcDporlpNYZ9RcwsScLFlKBQHWOFtdoibAfgw== X-Received: by 2002:a63:220b:: with SMTP id i11mr9252075pgi.50.1576141690983; Thu, 12 Dec 2019 01:08:10 -0800 (PST) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id e23sm5202765pjt.23.2019.12.12.01.08.10 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Dec 2019 01:08:10 -0800 (PST) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 4/6][SRU][F] drm/i915: Auto detect DPCD backlight support by default Date: Thu, 12 Dec 2019 17:07:42 +0800 Message-Id: <20191212090744.15106-12-acelan.kao@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191212090744.15106-1-acelan.kao@canonical.com> References: <20191212090744.15106-1-acelan.kao@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Lyude Paul BugLink: https://bugs.launchpad.net/bugs/1856134 Turns out we actually already have some companies, such as Lenovo, shipping machines with AMOLED screens that don't allow controlling the backlight through the usual PWM interface and only allow controlling it through the standard EDP DPCD interface. One example of one of these laptops is the X1 Extreme 2nd Generation. Since we've got systems that need this turned on by default now to have backlight controls working out of the box, let's start auto-detecting it for systems by default based on what the VBT tells us. We do this by changing the default value for the enable_dpcd_backlight module param from 0 to -1. Signed-off-by: Lyude Paul Reviewed-by: Jani Nikula (backported from https://patchwork.freedesktop.org/patch/342165/?series=69914&rev=4) Signed-off-by: AceLan Kao --- drivers/gpu/drm/i915/i915_params.c | 2 +- drivers/gpu/drm/i915/i915_params.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c index 296452f9efe4..483f34ca00f5 100644 --- a/drivers/gpu/drm/i915/i915_params.c +++ b/drivers/gpu/drm/i915/i915_params.c @@ -171,7 +171,7 @@ i915_param_named_unsafe(inject_load_failure, uint, 0400, i915_param_named(enable_dpcd_backlight, int, 0600, "Enable support for DPCD backlight control" - "(-1=use per-VBT LFP backlight type setting, 0=disabled [default], 1=enabled)"); + "(-1=use per-VBT LFP backlight type setting [default], 0=disabled, 1=enabled)"); #if IS_ENABLED(CONFIG_DRM_I915_GVT) i915_param_named(enable_gvt, bool, 0400, diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h index d29ade3b7de6..4de41c7eb7ef 100644 --- a/drivers/gpu/drm/i915/i915_params.h +++ b/drivers/gpu/drm/i915/i915_params.h @@ -64,7 +64,7 @@ struct drm_printer; param(int, reset, 2) \ param(unsigned int, inject_load_failure, 0) \ param(int, fastboot, -1) \ - param(int, enable_dpcd_backlight, 0) \ + param(int, enable_dpcd_backlight, -1) \ param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE) \ /* leave bools at the end to not create holes */ \ param(bool, alpha_support, IS_ENABLED(CONFIG_DRM_I915_ALPHA_SUPPORT)) \