From: Dan Carpenter <dan.carpenter@oracle.com>
To: eryk.brol@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: [bug report] drm/amd/display: Add connector to the state if DSC debugfs is set
Date: Fri, 18 Sep 2020 17:28:41 +0300 [thread overview]
Message-ID: <20200918142841.GC909725@mwanda> (raw)
Hello Eryk Brol,
The patch c44a22b3128d: "drm/amd/display: Add connector to the state
if DSC debugfs is set" from Aug 27, 2020, leads to the following
static checker warning:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:917 amdgpu_check_debugfs_connector_property_change()
error: 'crtc_state' dereferencing possible ERR_PTR()
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
883 static void amdgpu_check_debugfs_connector_property_change(struct amdgpu_device *adev,
884 struct drm_atomic_state *state)
885 {
886 struct drm_connector *connector;
887 struct drm_crtc *crtc;
888 struct amdgpu_dm_connector *amdgpu_dm_connector;
889 struct drm_connector_state *conn_state;
890 struct dm_crtc_state *acrtc_state;
891 struct drm_crtc_state *crtc_state;
892 struct dc_stream_state *stream;
893 struct drm_device *dev = adev_to_drm(adev);
894
895 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
896
897 amdgpu_dm_connector = to_amdgpu_dm_connector(connector);
898 conn_state = connector->state;
899
900 if (!(conn_state && conn_state->crtc))
901 continue;
902
903 crtc = conn_state->crtc;
904 acrtc_state = to_dm_crtc_state(crtc->state);
905
906 if (!(acrtc_state && acrtc_state->stream))
907 continue;
908
909 stream = acrtc_state->stream;
910
911 if (amdgpu_dm_connector->dsc_settings.dsc_force_enable ||
912 amdgpu_dm_connector->dsc_settings.dsc_num_slices_v ||
913 amdgpu_dm_connector->dsc_settings.dsc_num_slices_h ||
914 amdgpu_dm_connector->dsc_settings.dsc_bits_per_pixel) {
915 conn_state = drm_atomic_get_connector_state(state, connector);
916 crtc_state = drm_atomic_get_crtc_state(state, crtc);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check for errors?
917 crtc_state->mode_changed = true;
918 }
919 }
920 }
regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
reply other threads:[~2020-09-18 14:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200918142841.GC909725@mwanda \
--to=dan.carpenter@oracle.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=eryk.brol@amd.com \
/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