From: Claudio Suarez <cssk@net-c.es> To: dri-devel@lists.freedesktop.org, 0day robot <lkp@intel.com>, LKML <linux-kernel@vger.kernel.org>, lkp@lists.01.org, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@linux.ie> Subject: [PATCH] mock a drm_plane in igt_check_plane_state to make the test more robust Date: Thu, 2 Dec 2021 10:49:49 +0100 [thread overview] Message-ID: <YaiWvQESctDMipjh@gineta.localdomain> (raw) In-Reply-To: <YaiVfZWNyMkG8uED@gineta.localdomain> igt_check_plane_state test crashes in drm_atomic_helper_check_plane_state when trying to de-reference drm_plane_state->plane->dev due to the lack of a struct drm_plane in the mock struct drm_plane_state. Since drm_plane_state always should contain a plane, the mock also needs a plane to be the test more robust and realistic. Add it. Signed-off-by: Claudio Suarez <cssk@net-c.es> --- drivers/gpu/drm/selftests/test-drm_plane_helper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/selftests/test-drm_plane_helper.c b/drivers/gpu/drm/selftests/test-drm_plane_helper.c index 0a9553f51796..ceebeede55ea 100644 --- a/drivers/gpu/drm/selftests/test-drm_plane_helper.c +++ b/drivers/gpu/drm/selftests/test-drm_plane_helper.c @@ -87,11 +87,15 @@ int igt_check_plane_state(void *ignored) DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, }; + struct drm_plane plane = { + .dev = NULL + }; struct drm_framebuffer fb = { .width = 2048, .height = 2048 }; struct drm_plane_state plane_state = { + .plane = &plane, .crtc = ZERO_SIZE_PTR, .fb = &fb, .rotation = DRM_MODE_ROTATE_0 -- 2.33.0
WARNING: multiple messages have this Message-ID (diff)
From: Claudio Suarez <cssk@net-c.es> To: lkp@lists.01.org Subject: [PATCH] mock a drm_plane in igt_check_plane_state to make the test more robust Date: Thu, 02 Dec 2021 10:49:49 +0100 [thread overview] Message-ID: <YaiWvQESctDMipjh@gineta.localdomain> (raw) In-Reply-To: <YaiVfZWNyMkG8uED@gineta.localdomain> [-- Attachment #1: Type: text/plain, Size: 1173 bytes --] igt_check_plane_state test crashes in drm_atomic_helper_check_plane_state when trying to de-reference drm_plane_state->plane->dev due to the lack of a struct drm_plane in the mock struct drm_plane_state. Since drm_plane_state always should contain a plane, the mock also needs a plane to be the test more robust and realistic. Add it. Signed-off-by: Claudio Suarez <cssk@net-c.es> --- drivers/gpu/drm/selftests/test-drm_plane_helper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/selftests/test-drm_plane_helper.c b/drivers/gpu/drm/selftests/test-drm_plane_helper.c index 0a9553f51796..ceebeede55ea 100644 --- a/drivers/gpu/drm/selftests/test-drm_plane_helper.c +++ b/drivers/gpu/drm/selftests/test-drm_plane_helper.c @@ -87,11 +87,15 @@ int igt_check_plane_state(void *ignored) DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, }; + struct drm_plane plane = { + .dev = NULL + }; struct drm_framebuffer fb = { .width = 2048, .height = 2048 }; struct drm_plane_state plane_state = { + .plane = &plane, .crtc = ZERO_SIZE_PTR, .fb = &fb, .rotation = DRM_MODE_ROTATE_0 -- 2.33.0
next prev parent reply other threads:[~2021-12-02 9:50 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-26 10:49 [PATCH] drm: get rid of DRM_DEBUG_* log calls in drm core, files drm_a*.c Claudio Suarez 2021-11-26 15:45 ` Daniel Vetter 2021-11-26 21:57 ` Claudio Suarez 2021-11-28 14:20 ` [drm] d1af5cd869: BUG:kernel_NULL_pointer_dereference,address kernel test robot 2021-11-28 14:20 ` kernel test robot 2021-11-28 14:20 ` kernel test robot 2021-11-29 19:27 ` [PATCH] drm: fix error found in some cases after the patch d1af5cd86997 Claudio Suarez 2021-11-29 19:27 ` Claudio Suarez 2021-11-29 19:27 ` Claudio Suarez 2021-11-30 8:38 ` Daniel Vetter 2021-11-30 8:38 ` Daniel Vetter 2021-11-30 8:38 ` Daniel Vetter 2021-12-02 9:44 ` Claudio Suarez 2021-12-02 9:44 ` Claudio Suarez 2021-12-02 9:49 ` Claudio Suarez [this message] 2021-12-02 9:49 ` [PATCH] mock a drm_plane in igt_check_plane_state to make the test more robust Claudio Suarez 2021-12-02 9:51 ` [PATCH v2] drm: fix error found in some cases after the patch d1af5cd86997 Claudio Suarez 2021-12-02 9:51 ` Claudio Suarez 2021-12-20 9:18 ` Daniel Vetter 2021-12-20 9:18 ` Daniel Vetter 2021-12-20 9:18 ` Daniel Vetter 2021-12-20 17:11 ` Daniel Vetter 2021-12-20 17:11 ` Daniel Vetter 2021-12-21 22:55 ` Claudio Suarez 2021-12-21 22:55 ` Claudio Suarez
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=YaiWvQESctDMipjh@gineta.localdomain \ --to=cssk@net-c.es \ --cc=airlied@linux.ie \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=lkp@intel.com \ --cc=lkp@lists.01.org \ --cc=maarten.lankhorst@linux.intel.com \ --cc=mripard@kernel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.