From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Sean Paul <sean@poorly.run>,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
freedreno@lists.freedesktop.org
Cc: lkp@intel.com, 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: [Intel-gfx] [kbuild] Re: [PATCH v2 04/13] drm/hdcp: Expand HDCP helper library for enable/disable/check
Date: Fri, 17 Sep 2021 13:58:45 +0300 [thread overview]
Message-ID: <202109170917.5gPBFFFL-lkp@intel.com> (raw)
In-Reply-To: <20210915203834.1439-5-sean@poorly.run>
Hi Sean,
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>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/gpu/drm/drm_hdcp.c:1208 drm_hdcp_helper_enable_hdcp() error: uninitialized symbol 'check_link_interval'.
Old smatch warnings:
drivers/gpu/drm/drm_hdcp.c:514 drm_hdcp_atomic_check() warn: inconsistent indenting
vim +/check_link_interval +1208 drivers/gpu/drm/drm_hdcp.c
cbc5065be3a652f Sean Paul 2021-09-15 1127 static int drm_hdcp_helper_enable_hdcp(struct drm_hdcp_helper_data *data,
cbc5065be3a652f Sean Paul 2021-09-15 1128 struct drm_atomic_state *state,
cbc5065be3a652f Sean Paul 2021-09-15 1129 struct mutex *driver_mutex)
cbc5065be3a652f Sean Paul 2021-09-15 1130 {
cbc5065be3a652f Sean Paul 2021-09-15 1131 struct drm_connector *connector = data->connector;
cbc5065be3a652f Sean Paul 2021-09-15 1132 struct drm_connector_state *conn_state;
cbc5065be3a652f Sean Paul 2021-09-15 1133 struct drm_device *dev = connector->dev;
cbc5065be3a652f Sean Paul 2021-09-15 1134 unsigned long check_link_interval;
^^^^^^^^^^^^^^^^^^^
cbc5065be3a652f Sean Paul 2021-09-15 1135 bool capable;
cbc5065be3a652f Sean Paul 2021-09-15 1136 int ret = 0;
cbc5065be3a652f Sean Paul 2021-09-15 1137
cbc5065be3a652f Sean Paul 2021-09-15 1138 conn_state = drm_atomic_get_new_connector_state(state, connector);
cbc5065be3a652f Sean Paul 2021-09-15 1139
cbc5065be3a652f Sean Paul 2021-09-15 1140 mutex_lock(&data->mutex);
cbc5065be3a652f Sean Paul 2021-09-15 1141
cbc5065be3a652f Sean Paul 2021-09-15 1142 if (data->value == DRM_MODE_CONTENT_PROTECTION_ENABLED) {
cbc5065be3a652f Sean Paul 2021-09-15 1143 drm_hdcp_update_value(data, DRM_MODE_CONTENT_PROTECTION_ENABLED,
cbc5065be3a652f Sean Paul 2021-09-15 1144 true);
cbc5065be3a652f Sean Paul 2021-09-15 1145 goto out_data_mutex;
cbc5065be3a652f Sean Paul 2021-09-15 1146 }
cbc5065be3a652f Sean Paul 2021-09-15 1147
cbc5065be3a652f Sean Paul 2021-09-15 1148 drm_WARN_ON(dev, data->driver_mutex != NULL);
cbc5065be3a652f Sean Paul 2021-09-15 1149 data->driver_mutex = driver_mutex;
cbc5065be3a652f Sean Paul 2021-09-15 1150
cbc5065be3a652f Sean Paul 2021-09-15 1151 drm_hdcp_helper_driver_lock(data);
cbc5065be3a652f Sean Paul 2021-09-15 1152
cbc5065be3a652f Sean Paul 2021-09-15 1153 if (data->funcs->setup) {
cbc5065be3a652f Sean Paul 2021-09-15 1154 ret = data->funcs->setup(connector, state);
cbc5065be3a652f Sean Paul 2021-09-15 1155 if (ret) {
cbc5065be3a652f Sean Paul 2021-09-15 1156 drm_err(dev, "Failed to setup HDCP %d\n", ret);
cbc5065be3a652f Sean Paul 2021-09-15 1157 goto out;
cbc5065be3a652f Sean Paul 2021-09-15 1158 }
cbc5065be3a652f Sean Paul 2021-09-15 1159 }
cbc5065be3a652f Sean Paul 2021-09-15 1160
cbc5065be3a652f Sean Paul 2021-09-15 1161 if (!data->funcs->are_keys_valid ||
cbc5065be3a652f Sean Paul 2021-09-15 1162 !data->funcs->are_keys_valid(connector)) {
cbc5065be3a652f Sean Paul 2021-09-15 1163 if (data->funcs->load_keys) {
cbc5065be3a652f Sean Paul 2021-09-15 1164 ret = data->funcs->load_keys(connector);
cbc5065be3a652f Sean Paul 2021-09-15 1165 if (ret) {
cbc5065be3a652f Sean Paul 2021-09-15 1166 drm_err(dev, "Failed to load HDCP keys %d\n", ret);
cbc5065be3a652f Sean Paul 2021-09-15 1167 goto out;
cbc5065be3a652f Sean Paul 2021-09-15 1168 }
cbc5065be3a652f Sean Paul 2021-09-15 1169 }
cbc5065be3a652f Sean Paul 2021-09-15 1170 }
cbc5065be3a652f Sean Paul 2021-09-15 1171
cbc5065be3a652f Sean Paul 2021-09-15 1172 /*
cbc5065be3a652f Sean Paul 2021-09-15 1173 * Considering that HDCP2.2 is more secure than HDCP1.4, If the setup
cbc5065be3a652f Sean Paul 2021-09-15 1174 * is capable of HDCP2.2, it is preferred to use HDCP2.2.
cbc5065be3a652f Sean Paul 2021-09-15 1175 */
cbc5065be3a652f Sean Paul 2021-09-15 1176 ret = data->funcs->hdcp2_capable(connector, &capable);
cbc5065be3a652f Sean Paul 2021-09-15 1177 if (ret) {
cbc5065be3a652f Sean Paul 2021-09-15 1178 drm_err(dev, "HDCP 2.x capability check failed %d\n", ret);
cbc5065be3a652f Sean Paul 2021-09-15 1179 goto out;
cbc5065be3a652f Sean Paul 2021-09-15 1180 }
cbc5065be3a652f Sean Paul 2021-09-15 1181 if (capable) {
cbc5065be3a652f Sean Paul 2021-09-15 1182 data->enabled_type = DRM_MODE_HDCP_CONTENT_TYPE1;
cbc5065be3a652f Sean Paul 2021-09-15 1183 ret = data->funcs->hdcp2_enable(connector);
cbc5065be3a652f Sean Paul 2021-09-15 1184 if (!ret) {
cbc5065be3a652f Sean Paul 2021-09-15 1185 check_link_interval = DRM_HDCP2_CHECK_PERIOD_MS;
cbc5065be3a652f Sean Paul 2021-09-15 1186 goto out;
cbc5065be3a652f Sean Paul 2021-09-15 1187 }
cbc5065be3a652f Sean Paul 2021-09-15 1188 }
cbc5065be3a652f Sean Paul 2021-09-15 1189
cbc5065be3a652f Sean Paul 2021-09-15 1190 /*
cbc5065be3a652f Sean Paul 2021-09-15 1191 * When HDCP2.2 fails and Content Type is not Type1, HDCP1.4 will
cbc5065be3a652f Sean Paul 2021-09-15 1192 * be attempted.
cbc5065be3a652f Sean Paul 2021-09-15 1193 */
cbc5065be3a652f Sean Paul 2021-09-15 1194 ret = drm_hdcp_helper_hdcp1_capable(data, &capable);
cbc5065be3a652f Sean Paul 2021-09-15 1195 if (ret) {
cbc5065be3a652f Sean Paul 2021-09-15 1196 drm_err(dev, "HDCP 1.x capability check failed %d\n", ret);
cbc5065be3a652f Sean Paul 2021-09-15 1197 goto out;
cbc5065be3a652f Sean Paul 2021-09-15 1198 }
cbc5065be3a652f Sean Paul 2021-09-15 1199 if (capable && conn_state->content_type != DRM_MODE_HDCP_CONTENT_TYPE1) {
cbc5065be3a652f Sean Paul 2021-09-15 1200 data->enabled_type = DRM_MODE_HDCP_CONTENT_TYPE0;
cbc5065be3a652f Sean Paul 2021-09-15 1201 ret = drm_hdcp_helper_hdcp1_enable(data);
cbc5065be3a652f Sean Paul 2021-09-15 1202 if (!ret)
cbc5065be3a652f Sean Paul 2021-09-15 1203 check_link_interval = DRM_HDCP_CHECK_PERIOD_MS;
cbc5065be3a652f Sean Paul 2021-09-15 1204 }
"ret = 0" and "check_link_interval" is unitialized on else path.
cbc5065be3a652f Sean Paul 2021-09-15 1205
cbc5065be3a652f Sean Paul 2021-09-15 1206 out:
cbc5065be3a652f Sean Paul 2021-09-15 1207 if (!ret) {
cbc5065be3a652f Sean Paul 2021-09-15 @1208 schedule_delayed_work(&data->check_work, check_link_interval);
^^^^^^^^^^^^^^^^^^^
cbc5065be3a652f Sean Paul 2021-09-15 1209 drm_hdcp_update_value(data, DRM_MODE_CONTENT_PROTECTION_ENABLED,
cbc5065be3a652f Sean Paul 2021-09-15 1210 true);
cbc5065be3a652f Sean Paul 2021-09-15 1211 }
cbc5065be3a652f Sean Paul 2021-09-15 1212
cbc5065be3a652f Sean Paul 2021-09-15 1213 drm_hdcp_helper_driver_unlock(data);
cbc5065be3a652f Sean Paul 2021-09-15 1214 if (ret)
cbc5065be3a652f Sean Paul 2021-09-15 1215 data->driver_mutex = NULL;
cbc5065be3a652f Sean Paul 2021-09-15 1216
cbc5065be3a652f Sean Paul 2021-09-15 1217 out_data_mutex:
cbc5065be3a652f Sean Paul 2021-09-15 1218 mutex_unlock(&data->mutex);
cbc5065be3a652f Sean Paul 2021-09-15 1219 return ret;
cbc5065be3a652f Sean Paul 2021-09-15 1220 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
next prev parent reply other threads:[~2021-09-17 10:59 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
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 ` Dan Carpenter [this message]
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=202109170917.5gPBFFFL-lkp@intel.com \
--to=dan.carpenter@oracle.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=kbuild@lists.01.org \
--cc=lkp@intel.com \
--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