Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6397689rwi; Tue, 18 Oct 2022 11:51:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7WZfPepOszeXh57zQKGIJJSWK8tlLzGKHNHw9quGJUojpM/iGCpCggfH4sgbOWkMXeU1Pn X-Received: by 2002:a17:907:7e87:b0:791:a477:1109 with SMTP id qb7-20020a1709077e8700b00791a4771109mr1290735ejc.354.1666119104338; Tue, 18 Oct 2022 11:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666119104; cv=none; d=google.com; s=arc-20160816; b=CeEeRZ5FKjvtNQZtVJ31bgqyrEhhZLvj6E+3ZjyNwJaW2oFI5Eoyt2zJRR28ryk0Gx TDdJ0BAufg4YCEBBXcLryNBk9k9ID0tmGvCWjlLeNTb8/ur5UMD3AgmpQLtA4ZFzzM7P QWGzpWJ/u9W9pApB/Z5PBnzYv4fiSLpL4jscryuSE0FxRVfh0IoK0D7rqBwH10WrBjsU kGOu9EU8Y8/J7tOEDXWvcl/Z7sJz1aNRH6/EeMCZ2zfyaHHk/Nd85DyOtvzxIpKZC72m 6jTg2tpQN4e4HwCsHfL9xHSJe2Or5HRenFSnKqKAaKNst16EDZXbST/J+2CYDwmiuXtG axwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RTmzq7eoqYW6NBc3Vsko4U0xjZphvkiO+FIl89OP+4g=; b=AsPZ3GfrVZUYFKgO+1cs8rfyE4leot9y63iS0KuQ8BKZ/kfcqGPCQaTm4oOq1M2uDE puN8WLE/14eQyMlIHD0XSgtNXNoO4A+DQvTNg+OwigEmaDzU6s+7TBnpAgblZLFp81GE +XO7qh0QsnYuokwe3IuJkXh7CvpzDA/Tf4xc+Xv9MWaD38Q6YjCzVv25f3HJ/jiAdhXb HAMCI5d5zq8jechEHM7ewKSa7By1EqiKok3H1sRjFcsztLGcJAoVKOvwIUkvedp+VQ+T zJh5oCl5qH/XSd0CkBpsMFgJJqUAPn8cXZxlPjOmbW2Bh+DtbMzUqpIKAT7CtdlES2eZ tkeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KAEU2iVH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he7-20020a1709073d8700b0078e1a6fbe12si14436243ejc.16.2022.10.18.11.51.18; Tue, 18 Oct 2022 11:51:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KAEU2iVH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229649AbiJRS02 (ORCPT + 99 others); Tue, 18 Oct 2022 14:26:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbiJRS00 (ORCPT ); Tue, 18 Oct 2022 14:26:26 -0400 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C916A47E for ; Tue, 18 Oct 2022 11:26:25 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id b79so12326880iof.5 for ; Tue, 18 Oct 2022 11:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RTmzq7eoqYW6NBc3Vsko4U0xjZphvkiO+FIl89OP+4g=; b=KAEU2iVH6lvM1Vadrgtxn8/Ndza1LhSV1UA/xU5Cb4JE6wwmI7gzeJFoYih/YCwK5S 786yGxRpOOesWqPk0wkYuMgol6ThR+tJLe+h4KqiG0Q91wemNG0ssmKeUN+Df26cnL9d rrlQcBy4e7Yl0rwWEeLx54JAAS8j92neXQVB4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RTmzq7eoqYW6NBc3Vsko4U0xjZphvkiO+FIl89OP+4g=; b=uTJVmPS83/xv4jCFMexY3XSGs5utYpaMC+kPjJ1PyxFgZVyv+5AtQzILS1/fVuwFmD orMs+EcW94XGnSwiIrJHURGEriya+m3fN5XS1UOazBlxwWSwC6GAsfHLHadmOXFeN0TM SqnMPGSxqM/BC57sID2aufNORIv9qAWnCcx2euhz7O4sFZhe2HJsWf3diw/Rn0Qm4lRs T36CALR/rsR+aaHnT+fdMACtx7R19LODHW1ogUbwH9RaD8xqD/mjgS17SBez5MNAJWiT ad2wKl3YWs3pwJTGqzbaJJQaYv3ZjH+rUWKqcf4Rl8r2xKT6XSeVUAQiNRqSJY+Y6KLg pyNA== X-Gm-Message-State: ACrzQf0+wCTP7H9mxdlIQni/n5dpqZbcoumjTng0boylm/Dlgi42WTA9 CDiUYzdU+x2BvlYtnuqdC/7VUPDFtFZAiQ== X-Received: by 2002:a05:6602:2e8d:b0:6bc:77d8:7713 with SMTP id m13-20020a0566022e8d00b006bc77d87713mr2450000iow.144.1666117584208; Tue, 18 Oct 2022 11:26:24 -0700 (PDT) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com. [209.85.166.54]) by smtp.gmail.com with ESMTPSA id g14-20020a02850e000000b00363ff12ca47sm1275814jai.125.2022.10.18.11.26.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Oct 2022 11:26:21 -0700 (PDT) Received: by mail-io1-f54.google.com with SMTP id o65so12500131iof.4 for ; Tue, 18 Oct 2022 11:26:21 -0700 (PDT) X-Received: by 2002:a05:6602:125d:b0:6bc:61ec:29c0 with SMTP id o29-20020a056602125d00b006bc61ec29c0mr2464726iou.81.1666117580728; Tue, 18 Oct 2022 11:26:20 -0700 (PDT) MIME-Version: 1.0 References: <20221012042030.573466-1-hsinyi@chromium.org> In-Reply-To: From: Sean Paul Date: Tue, 18 Oct 2022 14:25:41 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] drm_bridge: register content protect property To: Hsin-Yi Wang Cc: Douglas Anderson , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Daniel Vetter , dri-devel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 17, 2022 at 9:49 AM Hsin-Yi Wang wrote: > > On Wed, Oct 12, 2022 at 12:20 PM Hsin-Yi Wang wrote: > > > > Some bridges are able to update HDCP status from userspace request if > > they support HDCP. > > > > HDCP property is the same as other connector properties that need to be > > created after the connecter is initialized and before the connector is > > registered. > > > anx7625 is a user for this. I feel like we should not unconditionally attach this property for bridges, this should be done in the driver which supports it IMO. Sean > > > > Signed-off-by: Hsin-Yi Wang > > Reported-by: kernel test robot > > --- > > v2: Fix compile error when config is not set. > > --- > > drivers/gpu/drm/drm_bridge_connector.c | 3 +++ > > include/drm/display/drm_hdcp_helper.h | 8 ++++++++ > > 2 files changed, 11 insertions(+) > > > > diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/drm/drm_bridge_connector.c > > index 1c7d936523df5..a3b9ef8dc3f0b 100644 > > --- a/drivers/gpu/drm/drm_bridge_connector.c > > +++ b/drivers/gpu/drm/drm_bridge_connector.c > > @@ -7,6 +7,7 @@ > > #include > > #include > > > > +#include > > #include > > #include > > #include > > @@ -398,6 +399,8 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm, > > if (panel_bridge) > > drm_panel_bridge_set_orientation(connector, panel_bridge); > > > > + drm_connector_attach_content_protection_property(connector, true); > > + > > return connector; > > } > > EXPORT_SYMBOL_GPL(drm_bridge_connector_init); > > diff --git a/include/drm/display/drm_hdcp_helper.h b/include/drm/display/drm_hdcp_helper.h > > index 8aaf87bf27351..c65d9f06a2532 100644 > > --- a/include/drm/display/drm_hdcp_helper.h > > +++ b/include/drm/display/drm_hdcp_helper.h > > @@ -15,8 +15,16 @@ struct drm_device; > > struct drm_connector; > > > > int drm_hdcp_check_ksvs_revoked(struct drm_device *dev, u8 *ksvs, u32 ksv_count); > > +#if defined(CONFIG_DRM_DISPLAY_HDCP_HELPER) > > int drm_connector_attach_content_protection_property(struct drm_connector *connector, > > bool hdcp_content_type); > > +#else > > +static inline int drm_connector_attach_content_protection_property(struct drm_connector *connector, > > + bool hdcp_content_type) > > +{ > > + return 0; > > +} > > +#endif > > void drm_hdcp_update_content_protection(struct drm_connector *connector, u64 val); > > > > #endif > > -- > > 2.38.0.rc1.362.ged0d419d3c-goog > >