From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B8C7C04EBE for ; Thu, 8 Oct 2020 17:07:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 89AAC21D7D for ; Thu, 8 Oct 2020 17:07:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="X2ZO5ffj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89AAC21D7D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4BBB16EAA4; Thu, 8 Oct 2020 17:07:05 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 90DF86E0BE for ; Thu, 8 Oct 2020 17:07:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602176822; h=from:from:reply-to: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=rK1iYGxAQ5ciDSQAszI1wUVPzFtoiJoG8sac/Clna0o=; b=X2ZO5ffjOAmq12BLTKkp+xuJWVJrZzC30+AosoSwEqwbYr7VXLpH8xxO/LjPENoG8vV2/6 2Yp1O3Oe6AVz9PnKTG452e0vymr06kjGpJ21gfRDBKhCxPUix7cSworgxY4hn47IX26Dop 2vAGlHaSyRK/2kKWw4NpHXaIc4Cjt4o= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-434-ZAUVm_BZOtSgoyBWO_CfZQ-1; Thu, 08 Oct 2020 13:06:59 -0400 X-MC-Unique: ZAUVm_BZOtSgoyBWO_CfZQ-1 Received: by mail-qk1-f200.google.com with SMTP id g184so4438792qke.3 for ; Thu, 08 Oct 2020 10:06:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:reply-to:to:cc:date :in-reply-to:references:organization:user-agent:mime-version :content-transfer-encoding; bh=rK1iYGxAQ5ciDSQAszI1wUVPzFtoiJoG8sac/Clna0o=; b=sBapim6+4tx3pycouc4Aep59Qdi4QlZJ4ZI18xdtXgJu4XCv8F4JeBpjwqOpAUdZej eY64ZrS+KgD3OHqeh0HE5tVwd3FHrgzUz5HAYiGtF/C6HIuCx2URBJrVNCzVFL+040KK 1/YztrXdkB9yWzUO4sGbfHEevY+AwAGFa/xqVnW/SYjcBQ6yXT32kA3KVy0sVubFX/8w LaC9S9t1oVthyTG+ZU1SlAThBw55IxW/ZC6/CJThWUxeCxZtaIAdtzm9SLMebS/fczC2 053WHWMYI492y417eh0+EPndfDwODpwoDYt3ZFmRPRUOUPfYXIoqfEy28MaMfHdp8I+C iOEg== X-Gm-Message-State: AOAM531Zu8uwECDePpTZiIR/FHZnmegy6j4amydUOe4jL8DrY7tevt5b IB44nyK/p6XPf9z/NrLtRuPZm2TmaQUzdFAG56lSB60bMk4KYakDFDAo8LfLMVbe2Zl6xXmM/gD 6+GBEbTlnmenP6DUbldk+Q+ywxJId X-Received: by 2002:ac8:73d0:: with SMTP id v16mr9207122qtp.384.1602176819471; Thu, 08 Oct 2020 10:06:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWocfkdhUGtEO7kiKzKyk6jBtDfxMhS6Bm8W9msZo38JHs1faT+EE/7YE2XbW0+jmyeTPl3A== X-Received: by 2002:ac8:73d0:: with SMTP id v16mr9207108qtp.384.1602176819239; Thu, 08 Oct 2020 10:06:59 -0700 (PDT) Received: from Whitewolf.lyude.net (pool-108-49-102-102.bstnma.fios.verizon.net. [108.49.102.102]) by smtp.gmail.com with ESMTPSA id j24sm4342925qkg.107.2020.10.08.10.06.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2020 10:06:58 -0700 (PDT) Message-ID: <27402476cddeef59e9ee05e1cdda430a9e34d29c.camel@redhat.com> Subject: Re: [PATCH 1/2] drm/i915/dpcd_bl: Skip testing control capability with force DPCD quirk From: Lyude Paul To: Kai-Heng Feng Date: Thu, 08 Oct 2020 13:06:57 -0400 In-Reply-To: References: <20201007065915.13883-1-kai.heng.feng@canonical.com> <268f495fbb7e3042eb613398a8513a83d28d3fd9.camel@redhat.com> Organization: Red Hat User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lyude@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: lyude@redhat.com Cc: Juha-Pekka Heikkila , David Airlie , intel-gfx@lists.freedesktop.org, open list , "open list:DRM DRIVERS" , Rodrigo Vivi , Satadru Pramanik Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" oh hold on, I misspoke. Here's the patch I was thinking of: https://patchwork.freedesktop.org/series/82041/ On Thu, 2020-10-08 at 10:32 +0800, Kai-Heng Feng wrote: > Hi Lyude, > > > On Oct 8, 2020, at 05:53, Lyude Paul wrote: > > > > Hi! I thought this patch rang a bell, we actually already had some > > discussion > > about this since there's a couple of other systems this was causing issues > > for. > > Unfortunately it never seems like that patch got sent out. Satadru? > > > > (if I don't hear back from them soon, I'll just send out a patch for this > > myself) > > > > JFYI - the proper fix here is to just drop the > > DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP check from the code entirely. As > > long as > > the backlight supports AUX_SET_CAP, that should be enough for us to control > > it. > > Does the proper fix include dropping DP_QUIRK_FORCE_DPCD_BACKLIGHT entirely? > > Kai-Heng > > > > > On Wed, 2020-10-07 at 14:58 +0800, Kai-Heng Feng wrote: > > > HP DreamColor panel needs to be controlled via AUX interface. However, > > > it has both DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP and > > > DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP set, so it fails to pass > > > intel_dp_aux_display_control_capable() test. > > > > > > Skip the test if the panel has force DPCD quirk. > > > > > > Signed-off-by: Kai-Heng Feng > > > --- > > > drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 10 ++++++---- > > > 1 file changed, 6 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 acbd7eb66cbe..acf2e1c65290 100644 > > > --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c > > > +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c > > > @@ -347,9 +347,13 @@ int intel_dp_aux_init_backlight_funcs(struct > > > intel_connector *intel_connector) > > > struct intel_panel *panel = &intel_connector->panel; > > > struct intel_dp *intel_dp = enc_to_intel_dp(intel_connector->encoder); > > > struct drm_i915_private *i915 = dp_to_i915(intel_dp); > > > + bool force_dpcd; > > > + > > > + force_dpcd = drm_dp_has_quirk(&intel_dp->desc, intel_dp->edid_quirks, > > > + DP_QUIRK_FORCE_DPCD_BACKLIGHT); > > > > > > if (i915->params.enable_dpcd_backlight == 0 || > > > - !intel_dp_aux_display_control_capable(intel_connector)) > > > + (!force_dpcd && > > > !intel_dp_aux_display_control_capable(intel_connector))) > > > return -ENODEV; > > > > > > /* > > > @@ -358,9 +362,7 @@ int intel_dp_aux_init_backlight_funcs(struct > > > intel_connector *intel_connector) > > > */ > > > if (i915->vbt.backlight.type != > > > INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE && > > > - i915->params.enable_dpcd_backlight != 1 && > > > - !drm_dp_has_quirk(&intel_dp->desc, intel_dp->edid_quirks, > > > - DP_QUIRK_FORCE_DPCD_BACKLIGHT)) { > > > + i915->params.enable_dpcd_backlight != 1 && !force_dpcd) { > > > drm_info(&i915->drm, > > > "Panel advertises DPCD backlight support, but " > > > "VBT disagrees. If your backlight controls " > > -- > > Sincerely, > > Lyude Paul (she/her) > > Software Engineer at Red Hat -- Sincerely, Lyude Paul (she/her) Software Engineer at Red Hat _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel