Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp22024ybc; Fri, 22 Nov 2019 15:18:59 -0800 (PST) X-Google-Smtp-Source: APXvYqy7mcpJVLcdGC+8FDshYLUg0ER02dtU378cWBQFC2O4PAlXqTHaM6/7DH8BuWN9/x1I0dEx X-Received: by 2002:a17:906:7251:: with SMTP id n17mr25314160ejk.329.1574464738910; Fri, 22 Nov 2019 15:18:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574464738; cv=none; d=google.com; s=arc-20160816; b=Ydd12yYUnWAt3ErgT4cFgi8Uz9CzVQfUVgUf7WixlIWPayjvhVMEk6DEHNbUoa03Jh bsmz1RjQM4kyYz32kKrP147z6kN9wYj6abZ9TraVKpsEbetczB9h8akiKjE2HNC2qjZt c9ILPXjNgZpnj15G+Uoe30x5HhmWks8N29fEbQy7K/uQf0COt44BA/om3X3AbSlXVtCh Z9oM8VTYNtNS7FKlJCghotT8TVB8O6swYU1yy9U2BrcsB9v4/bj2O+njeoAeP67o6Q6A UWOLAzEosDv7/4lVZWuaBOVQGXHUD6uUV17rla5sWuAacP8r4e8v2FEmLxLaIMZY8bs7 Ukow== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ty3XICBrVCjAb5qRaafGfNUSOlZQn/VM+rmDiTgZPxQ=; b=FbaaAg+nt+Ah0D6zOkkqJlvTlHAFC+/deU2r0V7A0BHlajAOatIXDMA7mBYJDD7/Br ZGrKwcLLCbbujqY+QU5xcSv0iL0zpNaDqj9/1HAWttl4x5vexJSfviWDN2lbMAl0Pz8B uw+mkOm0TmcNhidaS3BUksYExMD6TEmZ76d0eN7Tezh4IlZiBYWoTB76vTMsP9ODc79T s93TiWIZF6TSszmkX57jae/uZFskQbty5frXr4+1Un6bNVTQPngfOxu2uyGeN+Pj0iwP 9gA5Jq4BQmcJ+kpUi5LyIAbR1B8+F/Los1FZ8xFrRFpVqSOnbYpSt4RDsg0VMsY0tuGs wUOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gd0eDiIp; 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 m2si513997ejj.70.2019.11.22.15.18.35; Fri, 22 Nov 2019 15:18:58 -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=gd0eDiIp; 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 S1726992AbfKVXQx (ORCPT + 99 others); Fri, 22 Nov 2019 18:16:53 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:60096 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726895AbfKVXQw (ORCPT ); Fri, 22 Nov 2019 18:16:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574464611; 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=ty3XICBrVCjAb5qRaafGfNUSOlZQn/VM+rmDiTgZPxQ=; b=gd0eDiIpU3NLL2AYCPyyogi1cg/LrDSkdlxPdSV28gqNMis354G7hHOuAPwYf5DiNMyU87 h+5i0mUBzMi4WkAYSgZeA0/U4J7N9I6PNzzATNG/uXcEJz+bxborPtsCwvlmG15uc+M8rc Ool1LgwxLOpjWFFRrRdpksw4DUf8Jvo= 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-311-kNzxvEwmPZqBbyVJqFmDYw-1; Fri, 22 Nov 2019 18:16:50 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3C35F802693; Fri, 22 Nov 2019 23:16:48 +0000 (UTC) Received: from malachite.bss.redhat.com (dhcp-10-20-1-34.bss.redhat.com [10.20.1.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6657D19C4F; Fri, 22 Nov 2019 23:16:47 +0000 (UTC) From: Lyude Paul To: intel-gfx@lists.freedesktop.org Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] drm/i915: Auto detect DPCD backlight support by default Date: Fri, 22 Nov 2019 18:16:02 -0500 Message-Id: <20191122231616.2574-5-lyude@redhat.com> In-Reply-To: <20191122231616.2574-1-lyude@redhat.com> References: <20191122231616.2574-1-lyude@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: kNzxvEwmPZqBbyVJqFmDYw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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, 040= 0, =20 i915_param_named(enable_dpcd_backlight, int, 0600, =09"Enable support for DPCD backlight control" -=09"(-1=3Duse per-VBT LFP backlight type setting, 0=3Ddisabled [default], = 1=3Denabled)"); +=09"(-1=3Duse per-VBT LFP backlight type setting [default], 0=3Ddisabled, = 1=3Denabled)"); =20 #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; =09param(int, reset, 3) \ =09param(unsigned int, inject_probe_failure, 0) \ =09param(int, fastboot, -1) \ -=09param(int, enable_dpcd_backlight, 0) \ +=09param(int, enable_dpcd_backlight, -1) \ =09param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE) \ =09param(unsigned long, fake_lmem_start, 0) \ =09/* leave bools at the end to not create holes */ \ --=20 2.21.0