2022-10-11 10:43:17

by Hsin-Yi Wang

[permalink] [raw]
Subject: [PATCH] drm_bridge: register content protect property

Some bridges are able to update HDCP status from userspace requests 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.

Signed-off-by: Hsin-Yi Wang <[email protected]>
---
drivers/gpu/drm/drm_bridge_connector.c | 3 +++
1 file changed, 3 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 <linux/module.h>
#include <linux/slab.h>

+#include <drm/display/drm_hdcp_helper.h>
#include <drm/drm_atomic_state_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_bridge_connector.h>
@@ -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);
--
2.38.0.rc1.362.ged0d419d3c-goog


2022-10-11 16:28:26

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH] drm_bridge: register content protect property

Hi Hsin-Yi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on linus/master v6.0 next-20221011]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Hsin-Yi-Wang/drm_bridge-register-content-protect-property/20221011-182029
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
config: hexagon-randconfig-r003-20221010
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/2c11ca399866d4963cafba823b4fda9a8d1566db
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Hsin-Yi-Wang/drm_bridge-register-content-protect-property/20221011-182029
git checkout 2c11ca399866d4963cafba823b4fda9a8d1566db
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> ERROR: modpost: "drm_connector_attach_content_protection_property" [drivers/gpu/drm/drm_kms_helper.ko] undefined!

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (1.79 kB)
config (128.17 kB)
Download all attachments

2022-10-11 18:23:12

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH] drm_bridge: register content protect property

Hi Hsin-Yi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on linus/master v6.0 next-20221011]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Hsin-Yi-Wang/drm_bridge-register-content-protect-property/20221011-182029
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
config: hexagon-randconfig-r033-20221010
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/2c11ca399866d4963cafba823b4fda9a8d1566db
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Hsin-Yi-Wang/drm_bridge-register-content-protect-property/20221011-182029
git checkout 2c11ca399866d4963cafba823b4fda9a8d1566db
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

>> ld.lld: error: undefined symbol: drm_connector_attach_content_protection_property
>>> referenced by drm_bridge_connector.c
>>> gpu/drm/drm_bridge_connector.o:(drm_bridge_connector_init) in archive drivers/built-in.a
>>> referenced by drm_bridge_connector.c
>>> gpu/drm/drm_bridge_connector.o:(drm_bridge_connector_init) in archive drivers/built-in.a

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (2.04 kB)
config (141.86 kB)
Download all attachments

2022-11-02 05:51:15

by CK Hu (胡俊光)

[permalink] [raw]
Subject: Re: [PATCH] drm_bridge: register content protect property

Hi, Hsin-Yi:

On Tue, 2022-10-11 at 18:18 +0800, Hsin-Yi Wang wrote:
> Some bridges are able to update HDCP status from userspace requests
> 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.

So this is anx7625 support HDCP, right?
All connector with anx7625 has this problem, so I think this should be
done in drm core not in each SoC driver.

Regards,
CK

>
> Signed-off-by: Hsin-Yi Wang <[email protected]>
> ---
> drivers/gpu/drm/drm_bridge_connector.c | 3 +++
> 1 file changed, 3 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 <linux/module.h>
> #include <linux/slab.h>
>
> +#include <drm/display/drm_hdcp_helper.h>
> #include <drm/drm_atomic_state_helper.h>
> #include <drm/drm_bridge.h>
> #include <drm/drm_bridge_connector.h>
> @@ -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);

2022-11-03 06:42:58

by CK Hu (胡俊光)

[permalink] [raw]
Subject: Re: [PATCH] drm_bridge: register content protect property

Hi, Hsin-Yi:

On Wed, 2022-11-02 at 13:37 +0800, CK Hu wrote:
> Hi, Hsin-Yi:
>
> On Tue, 2022-10-11 at 18:18 +0800, Hsin-Yi Wang wrote:
> > Some bridges are able to update HDCP status from userspace requests
> > 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.
>
> So this is anx7625 support HDCP, right?
> All connector with anx7625 has this problem, so I think this should
> be
> done in drm core not in each SoC driver.

I misunderstanding this patch, so just ignore my comment.

Regards,
CK

>
> Regards,
> CK
>
> >
> > Signed-off-by: Hsin-Yi Wang <[email protected]>
> > ---
> > drivers/gpu/drm/drm_bridge_connector.c | 3 +++
> > 1 file changed, 3 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 <linux/module.h>
> > #include <linux/slab.h>
> >
> > +#include <drm/display/drm_hdcp_helper.h>
> > #include <drm/drm_atomic_state_helper.h>
> > #include <drm/drm_bridge.h>
> > #include <drm/drm_bridge_connector.h>
> > @@ -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);