Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6100286ybl; Sun, 22 Dec 2019 23:22:33 -0800 (PST) X-Google-Smtp-Source: APXvYqye9i//SZUaE8INEyKitzxBzHJgeHeJKGCxZ1qq8Fqw+9Ma13gB3V+Ov05F9xp2Rz7tZRTo X-Received: by 2002:a9d:12f1:: with SMTP id g104mr32106768otg.334.1577085752939; Sun, 22 Dec 2019 23:22:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577085752; cv=none; d=google.com; s=arc-20160816; b=oomFrUFhKRZnhqY3hItXeE2fcATjERfAtPZs9EPoWHDYzxSiVqV0V0HRGrGYwVQzih J8mp3YSIyW0kzBqsifdzIuZB5XLz0iR3OW6l0VDqCe8LiTg1kZ+O7bir3am9a3D3JXlX MNSh+P33b2h5sDEqr4ckesWdRRKAqJSZbUVobbFRibS4TuygsD/LjMGDUEpQDeywf/ae X4m1jMZPoCgDW4BFfWVxtOrAk5d0j9/bSaj3OA+T+XJ6c5aA8jbmXwGOH3zYPDp11SsH 3tpBx9ShvOagej/t1HPpdIkRY+06TdVp6Kp7vfMZQwIcSgVxbgvuqtotn5jMu602uRY7 PysA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=MW6YhL+RcyQYvYpj5YrVwXN8MDvDRWOnMuiAt/nHw6w=; b=fEfRPB/G66pEpfr0iHPSXmDgKYkqyIt/H2Wppic97qpZmGLkLk9NAP8ca0xkI4Qzmo yh7ynkYQQHCtqHEC8epznAu1kww1PTP/4q2VEU68xIJ93gCyGm4hOfkxL7lIc+QsQ0gc PBzojGfijwFqvFuiXat+B3uj3D+w5Yipu5+JT1nXgMLko/gz8aFhsQykafRVqC2UnZ1u vs33jrH//rZFOYC2xz+sfimVd9wyoGg0lzPFUKSMkfrPU8ZsnUaDQf0OfvwW6dD4qi3Z ZwYPRTzsNlqWIFAplYipg5EtuFNs1/8kz7VSS6Q3PeM6/0UUp/ofRgMZw5wfLTdFQKJS Kwiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BKvS60xx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a14si10853177otk.2.2019.12.22.23.22.21; Sun, 22 Dec 2019 23:22:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BKvS60xx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725953AbfLWHUt (ORCPT + 99 others); Mon, 23 Dec 2019 02:20:49 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:36756 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725855AbfLWHUt (ORCPT ); Mon, 23 Dec 2019 02:20:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1577085648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MW6YhL+RcyQYvYpj5YrVwXN8MDvDRWOnMuiAt/nHw6w=; b=BKvS60xxrDyGPxcHtlBgjcjNqD9a/6K/bFjDzZxTegfUrLvKN4Tvx8Mn1KYdyDiNMts4+c apJnNY9wDigX95BU6Kwoe/V9wYH0g7rOw2TeO9h4/0JJB+XqADkXVZxR7gL0+5ec02hGEq R1lLAfOA1TsXVXv3x+cQL9YVRUZ3PY8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-336-KC-JDB_cOcm-mTCqJAK6MA-1; Mon, 23 Dec 2019 02:20:45 -0500 X-MC-Unique: KC-JDB_cOcm-mTCqJAK6MA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 63424800D48; Mon, 23 Dec 2019 07:20:44 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-202.pek2.redhat.com [10.72.12.202]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD95A808F5; Mon, 23 Dec 2019 07:20:38 +0000 (UTC) Subject: Re: [4/5] drm/i915: Auto detect DPCD backlight support by default To: Lyude Paul , intel-gfx@lists.freedesktop.org Cc: David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20191122231616.2574-5-lyude@redhat.com> From: Perr Yuan Message-ID: <3ba84125-ab4c-e1a7-cb74-b65638f1c2d5@redhat.com> Date: Mon, 23 Dec 2019 02:20:36 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20191122231616.2574-5-lyude@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/22/19 6:16 PM, Lyude Paul wrote: > 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 > --- > 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 1dd1f3652795..31eed60c167e 100644 > --- a/drivers/gpu/drm/i915/i915_params.c > +++ b/drivers/gpu/drm/i915/i915_params.c > @@ -172,7 +172,7 @@ i915_param_named_unsafe(inject_probe_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 31b88f297fbc..a79d0867f77a 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, 3) \ > param(unsigned int, inject_probe_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) \ > param(unsigned long, fake_lmem_start, 0) \ > /* leave bools at the end to not create holes */ \ > Tested-by:Perry Yuan