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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AFFBDC433F5 for ; Wed, 6 Oct 2021 16:30:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 93C1B60F6C for ; Wed, 6 Oct 2021 16:30:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239389AbhJFQcP (ORCPT ); Wed, 6 Oct 2021 12:32:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:36295 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231755AbhJFQcN (ORCPT ); Wed, 6 Oct 2021 12:32:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633537821; 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: in-reply-to:in-reply-to:references:references; bh=ljugr8xYdJo7W0S7wZ1H4kpTYrrrY7cxZ+QUOs2N9UQ=; b=B9G18LG3X1/8ETee4pnUeSXHpS/pK0RlZHSY7slTCygIU6qRWxiZ99gvhI+MK4dINwr1Yq +BSuGsf1xeJT2rTxyH4fja7hjmEVCMBJEM3mCACFMh48JndSeEmEjV5HKAON1y5e6k5hod yiGPsPNmLgJ8kJJ1qsMqq6FNf4nK9vw= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-448-vZSTinNaOWuKR0tHdHxgYw-1; Wed, 06 Oct 2021 12:30:20 -0400 X-MC-Unique: vZSTinNaOWuKR0tHdHxgYw-1 Received: by mail-wr1-f70.google.com with SMTP id h11-20020adfa4cb000000b00160c791a550so2332186wrb.6 for ; Wed, 06 Oct 2021 09:30:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ljugr8xYdJo7W0S7wZ1H4kpTYrrrY7cxZ+QUOs2N9UQ=; b=417+XmhdOX6NR9V3TH9y8Ky13DqRAKEdgDj3f7tB/Ay/Ay222cmMLSaGPceBDxaeqS 5KeOmwAPuDYq1FrxuMFZ7FTAYvKXAf8Rj3NJ5yAdg8M9/fcD8u6+KGbhnvp5hsBGk5zq Ho84vapN7MLxS2+kZqyQBp1IH2rOJphXIXiwEvd2mNoNWsoXrEZYIGvKLW+AMc0O46C3 AMuyiShPB0UVBSurlFNL6Cb3fPjueP1+A7WBireFTWh+QFCeNx/8Rw00VnoSJ7POT3Yn 7ZsOfIyov1xOne9nQoRaG7qaMQ12b+KJTfbGBwaqwU21FGCOithPOzqEgsOsi3Kfykx7 7X3w== X-Gm-Message-State: AOAM530u01SOLeqKbqNMykoCFYlRKP4JikdLhSCUBPezJZtYMEQ3z1ee 5gnL45KcCwhPU88EYHsZKksok8HAyeyRiAel0UxbCPAZ6gg3lE/pgXYQqob9bdtU9lGtm+gu2w3 G9o+TLnUUryA3HkUQHzo4k0S2M/LQ6EJ5IFoY3LTu X-Received: by 2002:adf:a48e:: with SMTP id g14mr26148155wrb.11.1633537818828; Wed, 06 Oct 2021 09:30:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaown5rjXY7mQV5Hye51uwbkDUn6obL2IN464EW1FNLtOpErXXEji0g/kFgw0COlTE8icr8YVIyFdXOgO8M+U= X-Received: by 2002:adf:a48e:: with SMTP id g14mr26148135wrb.11.1633537818634; Wed, 06 Oct 2021 09:30:18 -0700 (PDT) MIME-Version: 1.0 References: <20211006024018.320394-1-lyude@redhat.com> <20211006024018.320394-3-lyude@redhat.com> In-Reply-To: <20211006024018.320394-3-lyude@redhat.com> From: Karol Herbst Date: Wed, 6 Oct 2021 18:30:07 +0200 Message-ID: Subject: Re: [Nouveau] [PATCH v3 2/5] drm/nouveau/kms/nv50-: Explicitly check DPCD backlights for aux enable/brightness To: Lyude Paul Cc: Intel Graphics Development , dri-devel , nouveau , Ben Skeggs , David Airlie , Daniel Vetter , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 6, 2021 at 4:41 AM Lyude Paul wrote: > > Since we don't support hybrid AUX/PWM backlights in nouveau right now, > let's add some explicit checks so that we don't break nouveau once we > enable support for these backlights in other drivers. > > Signed-off-by: Lyude Paul > --- > drivers/gpu/drm/nouveau/nouveau_backlight.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c > index 1cbd71abc80a..ae2f2abc8f5a 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c > +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c > @@ -308,7 +308,10 @@ nv50_backlight_init(struct nouveau_backlight *bl, > if (ret < 0) > return ret; > > - if (drm_edp_backlight_supported(edp_dpcd)) { > + /* TODO: Add support for hybrid PWM/DPCD panels */ > + if (drm_edp_backlight_supported(edp_dpcd) && > + (edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) && where does the DP_EDP_BACKLIGHT_AUX_ENABLE_CAP come from? afaik drm_edp_backlight_supported checks for DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP and DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP so wondering if this was intentional or a typo > + (edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP)) { > NV_DEBUG(drm, "DPCD backlight controls supported on %s\n", > nv_conn->base.name); > > -- > 2.31.1 > 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AF5EC433EF for ; Wed, 6 Oct 2021 16:30:30 +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 127F460F6C for ; Wed, 6 Oct 2021 16:30:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 127F460F6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 41F506EDBE; Wed, 6 Oct 2021 16:30:25 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 18E106EDBC for ; Wed, 6 Oct 2021 16:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633537823; 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: in-reply-to:in-reply-to:references:references; bh=ljugr8xYdJo7W0S7wZ1H4kpTYrrrY7cxZ+QUOs2N9UQ=; b=PgE5eKoPP3a3BVlqnmSL4PtQ8x21TuE3MdBT/lXF0KrT0mIsfbOaJzmrUYLhg0UM+BB8sL a6Fe3Xe3f9OLL/4xVCEVEFMDCjb3+VrAausXkf+okteh2tCW9H5t3/DFl22Xe/FMn3B9Cc TLDSzSXcdOmaI4SIf9/cQRebW6dJqXU= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-184-5XGHrXvTOUOaTH5_idmjcw-1; Wed, 06 Oct 2021 12:30:20 -0400 X-MC-Unique: 5XGHrXvTOUOaTH5_idmjcw-1 Received: by mail-wr1-f72.google.com with SMTP id r16-20020adfbb10000000b00160958ed8acso2502599wrg.16 for ; Wed, 06 Oct 2021 09:30:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ljugr8xYdJo7W0S7wZ1H4kpTYrrrY7cxZ+QUOs2N9UQ=; b=eI+ZSJf0KQgTKespx48dgebC7eXG/8dzbDCrgYauyviD4NZEVx0PqMZ2J8dRCp/DSM unyFgz+1sQKk0nGanZA4P8tzMoLfaCnQZkRHAkl4BJIHhcBJKpINcRDaNfz9U2EdDXf6 qa9iWNxaJ3SphvFfRNwssvyehOj1b0MHuLuzvJwxGRRRrCc9mD+BPVehOw27GL+6mjUb iezIvNPa2EvNNnWa/9sl2bblzT5LOcVfU1XbaZUa9YNfYvdjt4+R/Y5nr6f9cMsfDKv5 o4Bbfnq2PLCCzbHxvyH+vj1RqAB5mAk+9hO1/A2i48VFumWo/QBtOsRYBSb6gYvH74Ub 4Sxw== X-Gm-Message-State: AOAM5335btJ+r0hvpkxX8tSRhPkiBTzgOG7tIcTGN+eye4aWgyRJUASL u8/r3aiDZ380PL7T6xw7a9IYHDLx0zHL8WIY5Hee9JpeSVkHzNWZAxC3qOt5xMDGAO9JbIU5b/5 AgfOR1dZNBeuqtZSphCPnluBm0VlehZr2QKtU6VvUvofB X-Received: by 2002:adf:a48e:: with SMTP id g14mr26148176wrb.11.1633537818943; Wed, 06 Oct 2021 09:30:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaown5rjXY7mQV5Hye51uwbkDUn6obL2IN464EW1FNLtOpErXXEji0g/kFgw0COlTE8icr8YVIyFdXOgO8M+U= X-Received: by 2002:adf:a48e:: with SMTP id g14mr26148135wrb.11.1633537818634; Wed, 06 Oct 2021 09:30:18 -0700 (PDT) MIME-Version: 1.0 References: <20211006024018.320394-1-lyude@redhat.com> <20211006024018.320394-3-lyude@redhat.com> In-Reply-To: <20211006024018.320394-3-lyude@redhat.com> From: Karol Herbst Date: Wed, 6 Oct 2021 18:30:07 +0200 Message-ID: To: Lyude Paul Cc: Intel Graphics Development , dri-devel , nouveau , Ben Skeggs , David Airlie , Daniel Vetter , open list Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kherbst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [Intel-gfx] [Nouveau] [PATCH v3 2/5] drm/nouveau/kms/nv50-: Explicitly check DPCD backlights for aux enable/brightness X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, Oct 6, 2021 at 4:41 AM Lyude Paul wrote: > > Since we don't support hybrid AUX/PWM backlights in nouveau right now, > let's add some explicit checks so that we don't break nouveau once we > enable support for these backlights in other drivers. > > Signed-off-by: Lyude Paul > --- > drivers/gpu/drm/nouveau/nouveau_backlight.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c > index 1cbd71abc80a..ae2f2abc8f5a 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c > +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c > @@ -308,7 +308,10 @@ nv50_backlight_init(struct nouveau_backlight *bl, > if (ret < 0) > return ret; > > - if (drm_edp_backlight_supported(edp_dpcd)) { > + /* TODO: Add support for hybrid PWM/DPCD panels */ > + if (drm_edp_backlight_supported(edp_dpcd) && > + (edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) && where does the DP_EDP_BACKLIGHT_AUX_ENABLE_CAP come from? afaik drm_edp_backlight_supported checks for DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP and DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP so wondering if this was intentional or a typo > + (edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP)) { > NV_DEBUG(drm, "DPCD backlight controls supported on %s\n", > nv_conn->base.name); > > -- > 2.31.1 >