Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4617196ybl; Wed, 22 Jan 2020 01:19:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxjlHVvt+VZBiLFZ+teF26VxrxtDArT2GVFKgs1YREm0KIYC/IOdPOjePs6a9LP+tmvwKEJ X-Received: by 2002:a9d:3ea:: with SMTP id f97mr6415956otf.42.1579684749516; Wed, 22 Jan 2020 01:19:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579684749; cv=none; d=google.com; s=arc-20160816; b=SupVC9tPjjHEeBz8IaNhMNsb+lOq4IhPXKJvZwCCwt+0sPY/UacLzhp6OGVXejvPG8 4hOuQo3bnanhjE9OD8OYyCpu5C4StmHptDNojBCgdoeU+oW/ZQ4Wpx2yqEimgaWFDdY7 BaOiGO6Ps49pTRqnZ3hpxMHXVLAaQWcOEgI54xKRqGOABx6WQ6csi4n4TjWoP033rYPw iuZuzKrJQUfvj24PxSkyKGHOHMbS5ki1cGifYU7JCccQGcGHFfZqvWVy/o7r8EYX2xS5 ni/RDCc3XqpX0RCG84U2QtBt7m4Pe/+iUS2IZWqZqEysYoRkpohSoU8IMqjvmRAPsiPa DIjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from; bh=Ml0cAXvP0Gtj+TxV/TKK8z5SBWnzSIs9qJsZCTnH3AM=; b=kg99RdV6OX3xQcb7+k9w3218neMEPxe/bd9xrpYEyeBf6EBi2Yxq140PYG5/GDytos F3CWKWuXfqsE3ycco7E9GLcZd7b4fhJyhHyRYp8M529Don/sBSZbjSBbDR21ZGhzDBiX C13zEemCUHUIJuCF0/KR7Hszqq3YYqlntjTjyglR1B/cyjDIBE9KjpA/M16UAcQ55E8e 5tKoNQPZZzLxRJym7jZV70dm7hJwHAYFAmf7UXODcb1TydOhTF4PJeStNGBWVMBz1Cvj SaumvXhbFMuS6CQyvl8+IAwm8u5ne8oEY3jdxpOY/jGdWuOVTGhU4mSGCBrm1eQuNmtD /4iA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n18si24651437otf.285.2020.01.22.01.18.57; Wed, 22 Jan 2020 01:19:09 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729074AbgAVJQo (ORCPT + 99 others); Wed, 22 Jan 2020 04:16:44 -0500 Received: from mga18.intel.com ([134.134.136.126]:50803 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbgAVJQn (ORCPT ); Wed, 22 Jan 2020 04:16:43 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2020 01:16:42 -0800 X-IronPort-AV: E=Sophos;i="5.70,349,1574150400"; d="scan'208";a="215840368" Received: from mlblandf-mobl2.amr.corp.intel.com (HELO localhost) ([10.252.37.232]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2020 01:16:38 -0800 From: Jani Nikula To: Lyude Paul , intel-gfx@lists.freedesktop.org Cc: Perry Yuan , AceLan Kao , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Chris Wilson , Ville =?utf-8?B?U3lyasOkbMOk?= , Lee Shawn C , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] drm/i915: Don't use VBT for detecting DPCD backlight controls In-Reply-To: <20200117232155.135579-1-lyude@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20200116211623.53799-5-lyude@redhat.com> <20200117232155.135579-1-lyude@redhat.com> Date: Wed, 22 Jan 2020 11:17:32 +0200 Message-ID: <87lfpzj1eb.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Jan 2020, Lyude Paul wrote: > Despite the fact that the VBT appears to have a field for specifying > that a system is equipped with a panel that supports standard VESA > backlight controls over the DP AUX channel, so far every system we've > spotted DPCD backlight control support on doesn't actually set this > field correctly and all have it set to INTEL_BACKLIGHT_DISPLAY_DDI. > > While we don't know the exact reason for this VBT misuse, talking with > some vendors indicated that there's a good number of laptop panels out > there that supposedly support both PWM backlight controls and DPCD > backlight controls as a workaround until Intel supports DPCD backlight > controls across platforms universally. This being said, the X1 Extreme > 2nd Gen that I have here (note that Lenovo is not the hardware vendor > that informed us of this) PWM backlight controls are advertised, but > only DPCD controls actually function. I'm going to make an educated > guess here and say that on systems like this one, it's likely that PWM > backlight controls might have been intended to work but were never > really tested by QA. > > Since we really need backlights to work without any extra module > parameters, let's take the risk here and rely on the standard DPCD caps > to tell us whether AUX backlight controls are supported or not. We still > check the VBT, just so we can print a debugging message on systems that > advertise DPCD backlight support on the panel but not in the VBT. > > Changes since v3: > * Print a debugging message if we enable DPCD backlight control on a > device which doesn't report DPCD backlight controls in it's VBT, > instead of warning on custom panel backlight interfaces. > > Signed-off-by: Lyude Paul > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112376 > Cc: Jani Nikula > Cc: Perry Yuan > Cc: AceLan Kao Thanks for the patch, pushed to dinq, fingers crossed! ;) BR, Jani. > --- > drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c > index 77a759361c5c..0f8edc775375 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c > +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c > @@ -328,15 +328,16 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector) > int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector) > { > struct intel_panel *panel = &intel_connector->panel; > - struct drm_i915_private *dev_priv = to_i915(intel_connector->base.dev); > + enum intel_backlight_type type = > + to_i915(intel_connector->base.dev)->vbt.backlight.type; > > if (i915_modparams.enable_dpcd_backlight == 0 || > (i915_modparams.enable_dpcd_backlight == -1 && > - dev_priv->vbt.backlight.type != INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE)) > + !intel_dp_aux_display_control_capable(intel_connector))) > return -ENODEV; > > - if (!intel_dp_aux_display_control_capable(intel_connector)) > - return -ENODEV; > + if (type != INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE) > + DRM_DEBUG_DRIVER("Ignoring VBT backlight type\n"); > > panel->backlight.setup = intel_dp_aux_setup_backlight; > panel->backlight.enable = intel_dp_aux_enable_backlight; -- Jani Nikula, Intel Open Source Graphics Center