Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4277355pxf; Tue, 23 Mar 2021 07:08:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKt3YmYmeZg92H0kyYW96ZUAAHUlbE9Sc0S+PC/mVab4nFSaIfoGdglQCqdu4w7tcQ8pqu X-Received: by 2002:aa7:c98f:: with SMTP id c15mr4884920edt.231.1616508532229; Tue, 23 Mar 2021 07:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616508532; cv=none; d=google.com; s=arc-20160816; b=nNk4UNg84oGuUI+bvQa/N1Jev3Kzzh4kyGbvmiJ4Vf3qXoUE3dQM14vhmsmLL3Qt87 yrE8q1Hix3UJ6lDpJkz/hDlB4yOotqJIMuekW9xpGS+kdbWMkuPA4tCObt8sOQR7kPUv GfO50mLU/F04thTsjFSKmyznjl6rxklwoF2RNtcg529xVOQh6CDdFb+NJiyg6mGa1A9K u+x8eMFg4bXLyddvUHxkbVnqdDcrp0hTGfIivLVKy8tVngOsdbbAPiyS495o1vKBTf5z 6WNwOtxQ4dwJVf+nNZPCE/qXZZIjgzk78EZ13AcdbAvVhFcnt9UecjZqQj2ugrLlfXa1 ulrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:organization:in-reply-to:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=BMuSMn/6wKlEbCrNZxiTlDhTtizPKSjGzaSz6rB4S8o=; b=XaJrhV+OzwzFBWwXaA11z35SzZEYjUtUmn7TNnJSMNuUz/y6XxN1JnZOF9N+odSCZU b1IudbNvobyxAelp9lbevWYjm1KnxHRsu54jAvPAdRqr7R0EZZJlly1gVBEc9FSTjGMH Z87m7fNQarYp7aPagN3jzxYFSUzBNrxSWvhXRGRK+eZ/OSEgge9/odhc34OwsClb8CEb 9zYM2IrCmMo8kzMsh++1M4mIO7YiOLSmAJjRXtDPnSbsi4zVLTw17AWBZB4WefOQg7mE m+syiLCnfUYDEhMHns9vjumA4KU4ChuIHUvqj8qeaK58VDsZeRTA5IbLwF/kZY10SCzh l4ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id hs11si15434794ejc.375.2021.03.23.07.08.27; Tue, 23 Mar 2021 07:08:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232105AbhCWOGW convert rfc822-to-8bit (ORCPT + 99 others); Tue, 23 Mar 2021 10:06:22 -0400 Received: from mga14.intel.com ([192.55.52.115]:44770 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232158AbhCWOGN (ORCPT ); Tue, 23 Mar 2021 10:06:13 -0400 IronPort-SDR: 46nylmF01wxZhGJfMmOb9TvHP9mipiLaU3egVVxEARU0sKt4nF5Tdsw9YsWNU1IhRMsfQpRJCx QPSij6jLbspg== X-IronPort-AV: E=McAfee;i="6000,8403,9931"; a="189882787" X-IronPort-AV: E=Sophos;i="5.81,271,1610438400"; d="scan'208";a="189882787" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2021 07:06:12 -0700 IronPort-SDR: OgCpjYysMewcIG7T/5T0gGkytTxkwKdQzZxfWA+o+XkeIOGiAR9CjOmP4KM7hy9ER20JHM2jeu T502Uf/10h2w== X-IronPort-AV: E=Sophos;i="5.81,271,1610438400"; d="scan'208";a="414998948" Received: from wjlloyd-mobl2.ger.corp.intel.com (HELO localhost) ([10.252.53.124]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2021 07:06:08 -0700 From: Jani Nikula To: lyude@redhat.com, intel-gfx@lists.freedesktop.org Cc: Rodrigo Vivi , Joonas Lahtinen , David Airlie , Daniel Vetter , Sean Paul , Aaron Ma , Dave Airlie , "open list\:DRM DRIVERS" , open list Subject: Re: [PATCH] drm/i915/dpcd_bl: Don't try vesa interface unless specified by VBT In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20210318170204.513000-1-lyude@redhat.com> Date: Tue, 23 Mar 2021 16:06:05 +0200 Message-ID: <87k0py3qya.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Mar 2021, Lyude Paul wrote: > Actually-NAK this. I just realized I've been misreading the bug and that this > doesn't actually seem to be fixed. Will resend once I figure out what's going on Well, I think there are actually multiple issues on multiple machines. This fixes the issue on ThinkPad X1 Titanium Gen1 [1]. I suspect reverting 98e497e203a5 ("drm/i915/dpcd_bl: uncheck PWM_PIN_CAP when detect eDP backlight capabilities") would too. But then that would break *other* machines that claim support for *both* eDP PWM pin and DPCD backlight control, I think. I think there are issues with how we try setup DPCD backlight if the GOP has set up PWM backlight. For example, we don't set the backlight control mode correctly until the next disable/enable sequence. However, I tried to fix this, and I think I was doing all the right things, and DPCD reads seemed to confirm this, yet I was not able to control brightness using DPCD. I don't know what gives, but I do know eDP PWM pin control works. BR, Jani. [1] https://gitlab.freedesktop.org/drm/intel/-/issues/3158 > > On Thu, 2021-03-18 at 13:02 -0400, Lyude Paul wrote: >> Looks like that there actually are another subset of laptops on the market >> that don't support the Intel HDR backlight interface, but do advertise >> support for the VESA DPCD backlight interface despite the fact it doesn't >> seem to work. >> >> Note though I'm not entirely clear on this - on one of the machines where >> this issue was observed, I also noticed that we appeared to be rejecting >> the VBT defined backlight frequency in >> intel_dp_aux_vesa_calc_max_backlight(). It's noted in this function that: >> >> /* Use highest possible value of Pn for more granularity of brightness >>  * adjustment while satifying the conditions below. >>  * ... >>  * - FxP is within 25% of desired value. >>  *   Note: 25% is arbitrary value and may need some tweak. >>  */ >> >> So it's possible that this value might just need to be tweaked, but for now >> let's just disable the VESA backlight interface unless it's specified in >> the VBT just to be safe. We might be able to try enabling this again by >> default in the future. >> >> Fixes: 2227816e647a ("drm/i915/dp: Allow forcing specific interfaces through >> enable_dpcd_backlight") >> Cc: Jani Nikula >> Cc: Rodrigo Vivi >> Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/3169 >> Signed-off-by: Lyude Paul >> --- >>  drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 1 - >>  1 file changed, 1 deletion(-) >> >> 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 651884390137..4f8337c7fd2e 100644 >> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c >> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c >> @@ -646,7 +646,6 @@ int intel_dp_aux_init_backlight_funcs(struct >> intel_connector *connector) >>                         break; >>                 case INTEL_BACKLIGHT_DISPLAY_DDI: >>                         try_intel_interface = true; >> -                       try_vesa_interface = true; >>                         break; >>                 default: >>                         return -ENODEV; -- Jani Nikula, Intel Open Source Graphics Center