Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sean Paul <sean@poorly.run>,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	freedreno@lists.freedesktop.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Sean Paul <seanpaul@chromium.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [Intel-gfx] [PATCH 04/14] drm/hdcp: Expand HDCP helper library for enable/disable/check
Date: Tue, 14 Sep 2021 15:39:37 +0800	[thread overview]
Message-ID: <202109141530.UWnVHhHP-lkp@intel.com> (raw)
In-Reply-To: <20210913175747.47456-5-sean@poorly.run>

[-- Attachment #1: Type: text/plain, Size: 9875 bytes --]

Hi Sean,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]
[also build test WARNING on drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.15-rc1 next-20210914]
[cannot apply to drm-intel/for-linux-next drm/drm-next]
[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]

url:    https://github.com/0day-ci/linux/commits/Sean-Paul/drm-hdcp-Pull-HDCP-auth-exchange-check-into/20210914-020004
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: riscv-randconfig-r042-20210913 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/ceee3075ca23d7911b80eb6a71a0b352d7c6b52c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Sean-Paul/drm-hdcp-Pull-HDCP-auth-exchange-check-into/20210914-020004
        git checkout ceee3075ca23d7911b80eb6a71a0b352d7c6b52c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/drm_hdcp.c:13:
   In file included from include/linux/i2c.h:18:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   In file included from include/linux/kernel_stat.h:9:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from drivers/gpu/drm/drm_hdcp.c:13:
   In file included from include/linux/i2c.h:18:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   In file included from include/linux/kernel_stat.h:9:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from drivers/gpu/drm/drm_hdcp.c:13:
   In file included from include/linux/i2c.h:18:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   In file included from include/linux/kernel_stat.h:9:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
                                                     ~~~~~~~~~~ ^
>> drivers/gpu/drm/drm_hdcp.c:1280:21: warning: variable 'needs_enable' set but not used [-Wunused-but-set-variable]
           bool type_changed, needs_enable;
                              ^
   8 warnings generated.


vim +/needs_enable +1280 drivers/gpu/drm/drm_hdcp.c

  1251	
  1252	/**
  1253	 * drm_hdcp_helper_atomic_commit - Helper for drivers to call during commit to
  1254	 * enable/disable HDCP
  1255	 *
  1256	 * @data: pointer to the @drm_hdcp_helper_data for the connector
  1257	 * @state: pointer to the atomic state being committed
  1258	 * @driver_mutex: driver-provided lock to be used while interacting with the driver
  1259	 *
  1260	 * This function can be used by display drivers to determine when HDCP should be
  1261	 * enabled or disabled based on the connector state. It should be called during
  1262	 * steady-state commits as well as connector enable/disable. The function will
  1263	 * handle the HDCP authentication/encryption logic, calling back into the driver
  1264	 * when source operations are necessary.
  1265	 *
  1266	 * @driver_mutex will be retained and used for the duration of the HDCP session
  1267	 * since it will be needed for link checks and retries. This mutex is useful if
  1268	 * the driver has shared resources across connectors which must be serialized.
  1269	 * For example, driver_mutex can be used for MST connectors sharing a common
  1270	 * encoder which should not be accessed/changed concurrently. When the
  1271	 * connector's session is torn down, the mutex will be forgotten by the helper
  1272	 * for this connector until the next session.
  1273	 */
  1274	void drm_hdcp_helper_atomic_commit(struct drm_hdcp_helper_data *data,
  1275					   struct drm_atomic_state *state,
  1276					   struct mutex *driver_mutex)
  1277	{
  1278		struct drm_connector *connector = data->connector;
  1279		struct drm_connector_state *conn_state;
> 1280		bool type_changed, needs_enable;
  1281	
  1282		conn_state = drm_atomic_get_new_connector_state(state, connector);
  1283	
  1284		type_changed = conn_state->hdcp_content_type != data->enabled_type;
  1285		needs_enable = type_changed;
  1286	
  1287		if (conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_UNDESIRED) {
  1288			drm_hdcp_helper_disable_hdcp(data);
  1289			return;
  1290		}
  1291	
  1292		if (!conn_state->crtc) {
  1293			drm_hdcp_helper_disable_hdcp(data);
  1294	
  1295			/* Restore property to DESIRED so it's retried later */
  1296			if (conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED) {
  1297				mutex_lock(&data->mutex);
  1298				drm_hdcp_update_value(data, DRM_MODE_CONTENT_PROTECTION_DESIRED,
  1299						true);
  1300				mutex_unlock(&data->mutex);
  1301			}
  1302			return;
  1303		}
  1304	
  1305		/* Already enabled */
  1306		if (conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED)
  1307			return;
  1308	
  1309		/* Disable and re-enable HDCP on content type change */
  1310		if (type_changed)
  1311			drm_hdcp_helper_disable_hdcp(data);
  1312	
  1313		drm_hdcp_helper_enable_hdcp(data, state, driver_mutex);
  1314	}
  1315	EXPORT_SYMBOL(drm_hdcp_helper_atomic_commit);
  1316	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32723 bytes --]

  reply	other threads:[~2021-09-14  7:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 17:57 [Intel-gfx] [PATCH 00/14] drm/hdcp: Pull HDCP auth/exchange/check into Sean Paul
2021-09-13 17:57 ` [Intel-gfx] [PATCH 01/14] drm/hdcp: Add drm_hdcp_atomic_check() Sean Paul
2021-09-13 17:57 ` [Intel-gfx] [PATCH 02/14] drm/hdcp: Avoid changing crtc state in hdcp atomic check Sean Paul
2021-09-13 17:57 ` [Intel-gfx] [PATCH 03/14] drm/hdcp: Update property value on content type and user changes Sean Paul
2021-09-13 17:57 ` [Intel-gfx] [PATCH 04/14] drm/hdcp: Expand HDCP helper library for enable/disable/check Sean Paul
2021-09-14  7:39   ` kernel test robot [this message]
2021-09-13 17:57 ` [Intel-gfx] [PATCH 05/14] drm/i915/hdcp: Consolidate HDCP setup/state cache Sean Paul
2021-09-13 17:57 ` [Intel-gfx] [PATCH 06/14] drm/i915/hdcp: Retain hdcp_capable return codes Sean Paul
2021-09-13 17:57 ` [Intel-gfx] [PATCH 07/14] drm/i915/hdcp: Use HDCP helpers for i915 Sean Paul
2021-09-14  2:42   ` kernel test robot
2021-09-13 17:57 ` [Intel-gfx] [PATCH 08/14] drm/msm/dpu_kms: Re-order dpu includes Sean Paul
2021-09-13 17:57 ` [Intel-gfx] [PATCH 09/14] drm/msm/dpu: Remove useless checks in dpu_encoder Sean Paul
2021-09-13 17:57 ` [Intel-gfx] [PATCH 10/14] drm/msm/dpu: Remove encoder->enable() hack Sean Paul
2021-09-13 17:57 ` [Intel-gfx] [PATCH 11/14] drm/msm/dp: Re-order dp_audio_put in deinit_sub_modules Sean Paul
2021-09-13 17:57 ` [Intel-gfx] [PATCH 12/14] dt-bindings: msm/dp: Add bindings for HDCP registers Sean Paul
2021-09-13 21:31   ` Rob Herring
2021-09-14  1:23   ` Stephen Boyd
2021-09-13 17:57 ` [Intel-gfx] [PATCH 13/14] drm/msm: Add hdcp register ranges to sc7180 device tree Sean Paul
2021-09-14  1:28   ` Stephen Boyd
2021-09-13 17:57 ` [Intel-gfx] [PATCH 14/14] drm/msm: Implement HDCP 1.x using the new drm HDCP helpers Sean Paul
2021-09-13 18:05 ` [Intel-gfx] [PATCH 00/14] drm/hdcp: Pull HDCP auth/exchange/check into Alex Deucher
2021-09-13 19:26   ` Sean Paul
2021-09-13 21:08     ` Harry Wentland
2021-09-13 21:18 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202109141530.UWnVHhHP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    --cc=llvm@lists.linux.dev \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=sean@poorly.run \
    --cc=seanpaul@chromium.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox