Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp5168919pxb; Tue, 5 Oct 2021 19:44:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkTyJcBfy9S8H+s0KrVEPK7/47J4VeWSFc6GfHKSSNOCc0ddm+9kcZiMe7KtmTfwZVbKt2 X-Received: by 2002:a17:90a:c89:: with SMTP id v9mr7818057pja.71.1633488269240; Tue, 05 Oct 2021 19:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633488269; cv=none; d=google.com; s=arc-20160816; b=s2Eb2i+TZXXrLtcw5MlYeOEWMUKByz8NGwSMrEKvITWKUYvVXocwbD+W5EMy7rRVak cFBoBYMvEl0DHek3tFYvXfnxBGO/y5WQ1hBJs8lMj15xVIunIwQOwCH0i5ZI1oh+Y+et PTEaxbRcShTrrOGnriskDSg82l+ToW+NDU3Je2fnJFgJdO7lMH2r+hdp7h+/g8IFc2WC SA8tiRl/hy8LHvP7/+G9Q2Py6SWnJIjKO+KrJ4915YPzXluoJATe+NDrHXGYMbM3Ia+C mpv+aVI9GQ58vSEfe1JZvBCy+wUPZy2IGIoRL8PiHYn0i1BWyUjoGB5c3a4Ss0W7YzzS UL5g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VRuibAzD4usxTf8vGq2IshPiQf0ZGBrLjbZl7aosdOQ=; b=cIZx5LCfNwBcKUKE5+uBhHiy70DULygKYNlrfPBGGC/fx6QmA84cbc53b6cdPqUIrw sW3/W78070VfceFK12U1JOTRTGVltOzN18No0LRCE4MBH8OxuXaWQ843jG4egir3JWEy s28FcM7XWeo4aAR6BNNJbxeCYNTdGfme8n0yHuHhR6HebLpl6DeszB26kg6No5FXIhSZ YF0VCgnJOGiMjdGHbWosIwFI5j8f9+JFe/eXRfkK0R5EfRLJ26XT/EgGoQeYmfEKkPPQ FXJI87CgtE5c5z+DEEfj6izAt30rKNrNmkTkcXI4NkQ+Gg4H5QoljY4L+FuWdAxUD7il mX3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a5ZxUFyS; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b18si25137349pfb.1.2021.10.05.19.44.17; Tue, 05 Oct 2021 19:44:29 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a5ZxUFyS; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237278AbhJFCni (ORCPT + 99 others); Tue, 5 Oct 2021 22:43:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43014 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237292AbhJFCne (ORCPT ); Tue, 5 Oct 2021 22:43:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633488103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VRuibAzD4usxTf8vGq2IshPiQf0ZGBrLjbZl7aosdOQ=; b=a5ZxUFySISOOQmywBwlWOB55y21jcfkTjdRjDXiIbD7ClbZVfM7u/gZ9ls+PlyHcoN6Tn4 5cSfRwGZaRx+FRV09ghAH5j6g6+B1AVYAb8bGmBE8DmikT4mi6lzV0NQXF/ZOeyK35Kbsw RP8KVOssUBTedfO2J0eqNhDYqMQBxxQ= 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-212-TsyCj4yHPCe0F15gYLyScg-1; Tue, 05 Oct 2021 22:41:39 -0400 X-MC-Unique: TsyCj4yHPCe0F15gYLyScg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4AF88802C88; Wed, 6 Oct 2021 02:41:38 +0000 (UTC) Received: from Ruby.lyude.net (unknown [10.22.16.47]) by smtp.corp.redhat.com (Postfix) with ESMTP id 511799AA2E; Wed, 6 Oct 2021 02:41:36 +0000 (UTC) From: Lyude Paul To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Sean Paul , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 5/5] drm/i915: Clarify probing order in intel_dp_aux_init_backlight_funcs() Date: Tue, 5 Oct 2021 22:40:18 -0400 Message-Id: <20211006024018.320394-6-lyude@redhat.com> In-Reply-To: <20211006024018.320394-1-lyude@redhat.com> References: <20211006024018.320394-1-lyude@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hooray! We've managed to hit enough bugs upstream that I've been able to come up with a pretty solid explanation for how backlight controls are actually supposed to be detected and used these days. As well, having the rest of the PWM bits in VESA's backlight interface implemented seems to have fixed all of the problematic brightness controls laptop panels that we've hit so far. So, let's actually document this instead of just calling the laptop panels liars. As well, I would like to formally apologize to all of the laptop panels I called liars. I'm sorry laptop panels, hopefully you can all forgive me and we can move past this~ Signed-off-by: Lyude Paul --- .../drm/i915/display/intel_dp_aux_backlight.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 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 91daf9ab50e8..04a52d6a74ed 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c @@ -455,11 +455,17 @@ int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector) } /* - * A lot of eDP panels in the wild will report supporting both the - * Intel proprietary backlight control interface, and the VESA - * backlight control interface. Many of these panels are liars though, - * and will only work with the Intel interface. So, always probe for - * that first. + * Since Intel has their own backlight control interface, the majority of machines out there + * using DPCD backlight controls with Intel GPUs will be using this interface as opposed to + * the VESA interface. However, other GPUs (such as Nvidia's) will always use the VESA + * interface. This means that there's quite a number of panels out there that will advertise + * support for both interfaces, primarily systems with Intel/Nvidia hybrid GPU setups. + * + * There's a catch to this though: on many panels that advertise support for both + * interfaces, the VESA backlight interface will stop working once we've programmed the + * panel with Intel's OUI - which is also required for us to be able to detect Intel's + * backlight interface at all. This means that the only sensible way for us to detect both + * interfaces is to probe for Intel's first, and VESA's second. */ if (try_intel_interface && intel_dp_aux_supports_hdr_backlight(connector)) { drm_dbg_kms(dev, "Using Intel proprietary eDP backlight controls\n"); -- 2.31.1