All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android13-5.15 2/2] drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8615:3-4: Unneeded semicolon
@ 2026-11-15  4:09 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-15  4:09 UTC (permalink / raw)
  To: cros-kernel-buildreports; +Cc: oe-kbuild-all

tree:   https://android.googlesource.com/kernel/common android13-5.15
head:   3540cf724bf0fe246a3131fd1f3e9342fa03b03e
commit: 0ba6c7ba081e4ee55f326d46e56c3f6e3419fea1 [2/2] drm/amd/display: phase3 mst hdcp for multiple displays
config: x86_64-randconfig-2102-20261114 (https://download.01.org/0day-ci/archive/20261115/202611150549.tejfwsYE-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 8621950157210c1fa68f20f0614cb51310ec9dff)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611150549.tejfwsYE-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8615:3-4: Unneeded semicolon
   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8669:4-5: Unneeded semicolon
   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8673:3-4: Unneeded semicolon

vim +8615 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

  8567	
  8568	#ifdef CONFIG_DRM_AMD_DC_HDCP
  8569	static bool is_content_protection_different(struct drm_crtc_state *new_crtc_state,
  8570						    struct drm_crtc_state *old_crtc_state,
  8571						    struct drm_connector_state *new_conn_state,
  8572						    struct drm_connector_state *old_conn_state,
  8573						    const struct drm_connector *connector,
  8574						    struct hdcp_workqueue *hdcp_w)
  8575	{
  8576		struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
  8577		struct dm_connector_state *dm_con_state = to_dm_connector_state(connector->state);
  8578	
  8579		pr_debug("[HDCP_DM] connector->index: %x connect_status: %x dpms: %x\n",
  8580			connector->index, connector->status, connector->dpms);
  8581		pr_debug("[HDCP_DM] state protection old: %x new: %x\n",
  8582			old_conn_state->content_protection, new_conn_state->content_protection);
  8583	
  8584		if (old_crtc_state)
  8585			pr_debug("[HDCP_DM] old crtc en: %x a: %x m: %x a-chg: %x c-chg: %x\n",
  8586			old_crtc_state->enable,
  8587			old_crtc_state->active,
  8588			old_crtc_state->mode_changed,
  8589			old_crtc_state->active_changed,
  8590			old_crtc_state->connectors_changed);
  8591	
  8592		if (new_crtc_state)
  8593			pr_debug("[HDCP_DM] NEW crtc en: %x a: %x m: %x a-chg: %x c-chg: %x\n",
  8594			new_crtc_state->enable,
  8595			new_crtc_state->active,
  8596			new_crtc_state->mode_changed,
  8597			new_crtc_state->active_changed,
  8598			new_crtc_state->connectors_changed);
  8599	
  8600		/* hdcp content type change */
  8601		if (old_conn_state->hdcp_content_type != new_conn_state->hdcp_content_type &&
  8602		    new_conn_state->content_protection != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) {
  8603			new_conn_state->content_protection = DRM_MODE_CONTENT_PROTECTION_DESIRED;
  8604			pr_debug("[HDCP_DM] Type0/1 change %s :true\n", __func__);
  8605			return true;
  8606		}
  8607	
  8608		/* CP is being re enabled, ignore this */
  8609		if (old_conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED &&
  8610		    new_conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED) {
  8611			if (new_crtc_state && new_crtc_state->mode_changed) {
  8612				new_conn_state->content_protection = DRM_MODE_CONTENT_PROTECTION_DESIRED;
  8613				pr_debug("[HDCP_DM] ENABLED->DESIRED & mode_changed %s :true\n", __func__);
  8614				return true;
> 8615			};
  8616			new_conn_state->content_protection = DRM_MODE_CONTENT_PROTECTION_ENABLED;
  8617			pr_debug("[HDCP_DM] ENABLED -> DESIRED %s :false\n", __func__);
  8618			return false;
  8619		}
  8620	
  8621		/* S3 resume case, since old state will always be 0 (UNDESIRED) and the restored state will be ENABLED
  8622		 *
  8623		 * Handles:	UNDESIRED -> ENABLED
  8624		 */
  8625		if (old_conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_UNDESIRED &&
  8626		    new_conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED)
  8627			new_conn_state->content_protection = DRM_MODE_CONTENT_PROTECTION_DESIRED;
  8628	
  8629		/* Stream removed and re-enabled
  8630		 *
  8631		 * Can sometimes overlap with the HPD case,
  8632		 * thus set update_hdcp to false to avoid
  8633		 * setting HDCP multiple times.
  8634		 *
  8635		 * Handles:	DESIRED -> DESIRED (Special case)
  8636		 */
  8637		if (!(old_conn_state->crtc && old_conn_state->crtc->enabled) &&
  8638			new_conn_state->crtc && new_conn_state->crtc->enabled &&
  8639			connector->state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED) {
  8640			dm_con_state->update_hdcp = false;
  8641			pr_debug("[HDCP_DM] DESIRED->DESIRED (Stream removed and re-enabled) %s :true\n",
  8642				__func__);
  8643			return true;
  8644		}
  8645	
  8646		/* Hot-plug, headless s3, dpms
  8647		 *
  8648		 * Only start HDCP if the display is connected/enabled.
  8649		 * update_hdcp flag will be set to false until the next
  8650		 * HPD comes in.
  8651		 *
  8652		 * Handles:	DESIRED -> DESIRED (Special case)
  8653		 */
  8654		if (dm_con_state->update_hdcp &&
  8655		new_conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED &&
  8656		connector->dpms == DRM_MODE_DPMS_ON && aconnector->dc_sink != NULL) {
  8657			dm_con_state->update_hdcp = false;
  8658			pr_debug("[HDCP_DM] DESIRED->DESIRED (Hot-plug, headless s3, dpms) %s :true\n",
  8659				__func__);
  8660			return true;
  8661		}
  8662	
  8663		if (old_conn_state->content_protection == new_conn_state->content_protection) {
  8664			if (new_conn_state->content_protection >= DRM_MODE_CONTENT_PROTECTION_DESIRED) {
  8665				if (new_crtc_state && new_crtc_state->mode_changed) {
  8666					pr_debug("[HDCP_DM] DESIRED->DESIRED or ENABLE->ENABLE mode_change %s :true\n",
  8667						__func__);
  8668					return true;
  8669				};
  8670				pr_debug("[HDCP_DM] DESIRED->DESIRED & ENABLE->ENABLE %s :false\n",
  8671					__func__);
  8672				return false;
  8673			};
  8674	
  8675			pr_debug("[HDCP_DM] UNDESIRED->UNDESIRED %s :false\n", __func__);
  8676			return false;
  8677		}
  8678	
  8679		if (new_conn_state->content_protection != DRM_MODE_CONTENT_PROTECTION_ENABLED) {
  8680			pr_debug("[HDCP_DM] UNDESIRED->DESIRED or DESIRED->UNDESIRED or ENABLED->UNDESIRED %s :true\n",
  8681				__func__);
  8682			return true;
  8683		}
  8684	
  8685		pr_debug("[HDCP_DM] DESIRED->ENABLED %s :false\n", __func__);
  8686		return false;
  8687	}
  8688	#endif
  8689	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-15  4:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-15  4:09 [android-common:android13-5.15 2/2] drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8615:3-4: Unneeded semicolon kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.