public inbox for intel-gfx@lists.freedesktop.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: kbuild-all@lists.01.org, swboyd@chromium.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 v2 03/13] drm/hdcp: Update property value on content type and user changes
Date: Fri, 17 Sep 2021 06:48:22 +0800	[thread overview]
Message-ID: <202109170628.cMDBNZxE-lkp@intel.com> (raw)
In-Reply-To: <20210915203834.1439-4-sean@poorly.run>

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

Hi Sean,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip robh/for-next linus/master v5.15-rc1 next-20210916]
[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-helpers/20210916-044145
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-m001-20210916 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

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

smatch warnings:
drivers/gpu/drm/drm_hdcp.c:509 drm_hdcp_atomic_check() warn: inconsistent indenting

vim +509 drivers/gpu/drm/drm_hdcp.c

a46c52c65fdbf76 Sean Paul 2021-09-15  425  
a46c52c65fdbf76 Sean Paul 2021-09-15  426  /**
a46c52c65fdbf76 Sean Paul 2021-09-15  427   * drm_hdcp_atomic_check - Helper for drivers to call during connector->atomic_check
a46c52c65fdbf76 Sean Paul 2021-09-15  428   *
a46c52c65fdbf76 Sean Paul 2021-09-15  429   * @state: pointer to the atomic state being checked
a46c52c65fdbf76 Sean Paul 2021-09-15  430   * @connector: drm_connector on which content protection state needs an update
a46c52c65fdbf76 Sean Paul 2021-09-15  431   *
a46c52c65fdbf76 Sean Paul 2021-09-15  432   * This function can be used by display drivers to perform an atomic check on the
d0cdceca77739a6 Sean Paul 2021-09-15  433   * hdcp state elements. If hdcp state has changed in a manner which requires the
d0cdceca77739a6 Sean Paul 2021-09-15  434   * driver to enable or disable content protection, this function will return
d0cdceca77739a6 Sean Paul 2021-09-15  435   * true.
d0cdceca77739a6 Sean Paul 2021-09-15  436   *
d0cdceca77739a6 Sean Paul 2021-09-15  437   * Returns:
d0cdceca77739a6 Sean Paul 2021-09-15  438   * true if the driver must enable/disable hdcp, false otherwise
a46c52c65fdbf76 Sean Paul 2021-09-15  439   */
d0cdceca77739a6 Sean Paul 2021-09-15  440  bool drm_hdcp_atomic_check(struct drm_connector *connector,
a46c52c65fdbf76 Sean Paul 2021-09-15  441  			   struct drm_atomic_state *state)
a46c52c65fdbf76 Sean Paul 2021-09-15  442  {
a46c52c65fdbf76 Sean Paul 2021-09-15  443  	struct drm_connector_state *new_conn_state, *old_conn_state;
a46c52c65fdbf76 Sean Paul 2021-09-15  444  	struct drm_crtc_state *new_crtc_state;
a46c52c65fdbf76 Sean Paul 2021-09-15  445  	u64 old_hdcp, new_hdcp;
a46c52c65fdbf76 Sean Paul 2021-09-15  446  
a46c52c65fdbf76 Sean Paul 2021-09-15  447  	old_conn_state = drm_atomic_get_old_connector_state(state, connector);
a46c52c65fdbf76 Sean Paul 2021-09-15  448  	old_hdcp = old_conn_state->content_protection;
a46c52c65fdbf76 Sean Paul 2021-09-15  449  
a46c52c65fdbf76 Sean Paul 2021-09-15  450  	new_conn_state = drm_atomic_get_new_connector_state(state, connector);
a46c52c65fdbf76 Sean Paul 2021-09-15  451  	new_hdcp = new_conn_state->content_protection;
a46c52c65fdbf76 Sean Paul 2021-09-15  452  
a46c52c65fdbf76 Sean Paul 2021-09-15  453  	if (!new_conn_state->crtc) {
a46c52c65fdbf76 Sean Paul 2021-09-15  454  		/*
a46c52c65fdbf76 Sean Paul 2021-09-15  455  		 * If the connector is being disabled with CP enabled, mark it
a46c52c65fdbf76 Sean Paul 2021-09-15  456  		 * desired so it's re-enabled when the connector is brought back
a46c52c65fdbf76 Sean Paul 2021-09-15  457  		 */
d0cdceca77739a6 Sean Paul 2021-09-15  458  		if (old_hdcp == DRM_MODE_CONTENT_PROTECTION_ENABLED) {
a46c52c65fdbf76 Sean Paul 2021-09-15  459  			new_conn_state->content_protection =
a46c52c65fdbf76 Sean Paul 2021-09-15  460  				DRM_MODE_CONTENT_PROTECTION_DESIRED;
d0cdceca77739a6 Sean Paul 2021-09-15  461  			return true;
d0cdceca77739a6 Sean Paul 2021-09-15  462  		}
d0cdceca77739a6 Sean Paul 2021-09-15  463  		return false;
a46c52c65fdbf76 Sean Paul 2021-09-15  464  	}
a46c52c65fdbf76 Sean Paul 2021-09-15  465  
a46c52c65fdbf76 Sean Paul 2021-09-15  466  	new_crtc_state = drm_atomic_get_new_crtc_state(state,
a46c52c65fdbf76 Sean Paul 2021-09-15  467  						       new_conn_state->crtc);
a46c52c65fdbf76 Sean Paul 2021-09-15  468  	/*
a46c52c65fdbf76 Sean Paul 2021-09-15  469  	* Fix the HDCP uapi content protection state in case of modeset.
a46c52c65fdbf76 Sean Paul 2021-09-15  470  	* FIXME: As per HDCP content protection property uapi doc, an uevent()
a46c52c65fdbf76 Sean Paul 2021-09-15  471  	* need to be sent if there is transition from ENABLED->DESIRED.
a46c52c65fdbf76 Sean Paul 2021-09-15  472  	*/
a46c52c65fdbf76 Sean Paul 2021-09-15  473  	if (drm_atomic_crtc_needs_modeset(new_crtc_state) &&
a46c52c65fdbf76 Sean Paul 2021-09-15  474  	    (old_hdcp == DRM_MODE_CONTENT_PROTECTION_ENABLED &&
d0cdceca77739a6 Sean Paul 2021-09-15  475  	     new_hdcp != DRM_MODE_CONTENT_PROTECTION_UNDESIRED)) {
a46c52c65fdbf76 Sean Paul 2021-09-15  476  		new_conn_state->content_protection =
a46c52c65fdbf76 Sean Paul 2021-09-15  477  			DRM_MODE_CONTENT_PROTECTION_DESIRED;
d0cdceca77739a6 Sean Paul 2021-09-15  478  		return true;
d0cdceca77739a6 Sean Paul 2021-09-15  479  	}
d0cdceca77739a6 Sean Paul 2021-09-15  480  
d0cdceca77739a6 Sean Paul 2021-09-15  481  	/*
d0cdceca77739a6 Sean Paul 2021-09-15  482  	 * Coming back from disable or changing CRTC with DESIRED state requires
d0cdceca77739a6 Sean Paul 2021-09-15  483  	 * that the driver try CP enable.
d0cdceca77739a6 Sean Paul 2021-09-15  484  	 */
d0cdceca77739a6 Sean Paul 2021-09-15  485  	if (new_hdcp == DRM_MODE_CONTENT_PROTECTION_DESIRED &&
d0cdceca77739a6 Sean Paul 2021-09-15  486  	    new_conn_state->crtc != old_conn_state->crtc)
d0cdceca77739a6 Sean Paul 2021-09-15  487  		return true;
a46c52c65fdbf76 Sean Paul 2021-09-15  488  
a46c52c65fdbf76 Sean Paul 2021-09-15  489  	/*
6c538fd0f0a55b2 Sean Paul 2021-09-15  490  	 * Content type changes require an HDCP disable/enable cycle.
6c538fd0f0a55b2 Sean Paul 2021-09-15  491  	 */
6c538fd0f0a55b2 Sean Paul 2021-09-15  492  	if (new_conn_state->hdcp_content_type != old_conn_state->hdcp_content_type) {
6c538fd0f0a55b2 Sean Paul 2021-09-15  493  		new_conn_state->content_protection =
6c538fd0f0a55b2 Sean Paul 2021-09-15  494  			DRM_MODE_CONTENT_PROTECTION_DESIRED;
6c538fd0f0a55b2 Sean Paul 2021-09-15  495  		return true;
6c538fd0f0a55b2 Sean Paul 2021-09-15  496  	}
6c538fd0f0a55b2 Sean Paul 2021-09-15  497  
6c538fd0f0a55b2 Sean Paul 2021-09-15  498  	/*
6c538fd0f0a55b2 Sean Paul 2021-09-15  499  	 * Ignore meaningless state changes:
a46c52c65fdbf76 Sean Paul 2021-09-15  500  	 *  - HDCP was activated since the last commit
6c538fd0f0a55b2 Sean Paul 2021-09-15  501  	 *  - Attempting to set to desired while already enabled
a46c52c65fdbf76 Sean Paul 2021-09-15  502  	 */
6c538fd0f0a55b2 Sean Paul 2021-09-15  503  	if ((old_hdcp == DRM_MODE_CONTENT_PROTECTION_DESIRED &&
a46c52c65fdbf76 Sean Paul 2021-09-15  504  	     new_hdcp == DRM_MODE_CONTENT_PROTECTION_ENABLED) ||
a46c52c65fdbf76 Sean Paul 2021-09-15  505  	    (old_hdcp == DRM_MODE_CONTENT_PROTECTION_ENABLED &&
a46c52c65fdbf76 Sean Paul 2021-09-15  506  	     new_hdcp == DRM_MODE_CONTENT_PROTECTION_DESIRED)) {
6c538fd0f0a55b2 Sean Paul 2021-09-15  507  		new_conn_state->content_protection =
6c538fd0f0a55b2 Sean Paul 2021-09-15  508  			DRM_MODE_CONTENT_PROTECTION_ENABLED;
d0cdceca77739a6 Sean Paul 2021-09-15 @509  	     return false;

---
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: 35196 bytes --]

  reply	other threads:[~2021-09-16 22:49 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 20:38 [Intel-gfx] [PATCH v2 00/13] drm/hdcp: Pull HDCP auth/exchange/check into helpers Sean Paul
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 01/13] drm/hdcp: Add drm_hdcp_atomic_check() Sean Paul
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 02/13] drm/hdcp: Avoid changing crtc state in hdcp atomic check Sean Paul
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 03/13] drm/hdcp: Update property value on content type and user changes Sean Paul
2021-09-16 22:48   ` kernel test robot [this message]
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 04/13] drm/hdcp: Expand HDCP helper library for enable/disable/check Sean Paul
2021-09-17 10:58   ` [Intel-gfx] [kbuild] " Dan Carpenter
2021-09-21 23:34   ` [Intel-gfx] [Freedreno] " abhinavk
2021-09-28 17:33     ` Sean Paul
2021-09-28 21:28       ` abhinavk
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 05/13] drm/i915/hdcp: Consolidate HDCP setup/state cache Sean Paul
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 06/13] drm/i915/hdcp: Retain hdcp_capable return codes Sean Paul
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 07/13] drm/i915/hdcp: Use HDCP helpers for i915 Sean Paul
2021-09-17  0:10   ` kernel test robot
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 08/13] drm/msm/dpu_kms: Re-order dpu includes Sean Paul
2021-09-17  3:54   ` Stephen Boyd
2021-09-22  2:26   ` [Intel-gfx] [Freedreno] " abhinavk
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 09/13] drm/msm/dpu: Remove useless checks in dpu_encoder Sean Paul
2021-09-17  3:54   ` Stephen Boyd
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 10/13] drm/msm/dpu: Remove encoder->enable() hack Sean Paul
2021-09-17  3:53   ` Stephen Boyd
2021-09-17 17:25     ` Sean Paul
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 11/13] drm/msm/dp: Re-order dp_audio_put in deinit_sub_modules Sean Paul
2021-09-17  3:51   ` Stephen Boyd
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 12/13] dt-bindings: msm/dp: Add bindings for HDCP registers Sean Paul
2021-09-16 12:21   ` Rob Herring
2021-09-16 12:58   ` Rob Herring
2021-09-15 20:38 ` [Intel-gfx] [PATCH v2 13/13] drm/msm: Implement HDCP 1.x using the new drm HDCP helpers Sean Paul
2021-09-17  4:30   ` kernel test robot
2021-09-17  6:00   ` Stephen Boyd
2021-09-17 21:05     ` Sean Paul
2021-09-22  2:25   ` [Intel-gfx] [Freedreno] " abhinavk
2021-09-28 18:02     ` Sean Paul
2021-09-28 21:35       ` abhinavk
2021-09-29 14:52         ` Sean Paul
2021-09-15 21:58 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/hdcp: Pull HDCP auth/exchange/check into helpers Patchwork
2021-09-17 12:49   ` Jani Nikula
2021-09-17 12:51 ` [Intel-gfx] [PATCH v2 00/13] " Jani Nikula
2021-09-22  2:30 ` [Intel-gfx] [Freedreno] " abhinavk
2021-09-28 18:06   ` Sean Paul
2021-09-28 21:23     ` abhinavk

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=202109170628.cMDBNZxE-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=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=sean@poorly.run \
    --cc=seanpaul@chromium.org \
    --cc=swboyd@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