From: kernel test robot <lkp@intel.com>
To: sunpeng.li@amd.com, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org
Cc: oe-kbuild-all@lists.linux.dev, "Joshua Ashton" <joshua@froggi.es>,
"Michel Dänzer" <mdaenzer@redhat.com>,
"Chao Guo" <chao.guo@nxp.com>,
"Xaver Hugl" <xaver.hugl@gmail.com>,
"Vikas Korjani" <Vikas.Korjani@amd.com>,
"Robert Mader" <robert.mader@posteo.de>,
"Pekka Paalanen" <pekka.paalanen@collabora.com>,
"Sean Paul" <sean@poorly.run>, "Simon Ser" <contact@emersion.fr>,
"Shashank Sharma" <shashank.sharma@amd.com>,
"Harry Wentland" <harry.wentland@amd.com>,
"Sebastian Wick" <sebastian.wick@redhat.com>,
"Leo Li" <sunpeng.li@amd.com>
Subject: Re: [PATCH 1/2] drm/amd/display: Introduce overlay cursor mode
Date: Sat, 16 Mar 2024 16:38:35 +0800 [thread overview]
Message-ID: <202403161600.6KspdesJ-lkp@intel.com> (raw)
In-Reply-To: <20240315170959.165505-2-sunpeng.li@amd.com>
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on drm/drm-next drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.8 next-20240315]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/sunpeng-li-amd-com/drm-amd-display-Introduce-overlay-cursor-mode/20240316-011404
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/20240315170959.165505-2-sunpeng.li%40amd.com
patch subject: [PATCH 1/2] drm/amd/display: Introduce overlay cursor mode
config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20240316/202403161600.6KspdesJ-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240316/202403161600.6KspdesJ-lkp@intel.com/reproduce)
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/202403161600.6KspdesJ-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:10639: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Set whether the cursor should be enabled in native mode, or overlay mode, on
vim +10639 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
10637
10638 /**
10639 * Set whether the cursor should be enabled in native mode, or overlay mode, on
10640 * the dm_crtc_state.
10641 *
10642 * The cursor should be enabled in overlay mode if the immediate underlying
10643 * plane contains a video format.
10644 *
10645 * Since zpos info is required, drm_atomic_normalize_zpos must be called before
10646 * calling this function.
10647 */
10648 static int dm_crtc_set_cursor_mode(struct drm_atomic_state *state,
10649 struct dm_crtc_state *dm_crtc_state)
10650 {
10651 struct drm_plane_state *plane_state, *old_plane_state, *target_plane_state;
10652 struct drm_crtc_state *crtc_state = &dm_crtc_state->base;
10653 struct drm_plane *plane;
10654 bool consider_mode_change = false;
10655 bool cursor_changed = false;
10656 unsigned int target_zpos;
10657 unsigned int cursor_zpos;
10658 int i;
10659
10660 /*
10661 * Cursor mode can change if a plane's format changes, is
10662 * enabled/disabled, or z-order changes.
10663 */
10664 for_each_oldnew_plane_in_state(state, plane, old_plane_state, plane_state, i) {
10665
10666 /* Only care about planes on this CRTC */
10667 if ((drm_plane_mask(plane) & crtc_state->plane_mask) == 0)
10668 continue;
10669
10670 if (plane->type == DRM_PLANE_TYPE_CURSOR)
10671 cursor_changed = true;
10672
10673 if (drm_atomic_plane_enabling(old_plane_state, plane_state) ||
10674 drm_atomic_plane_disabling(old_plane_state, plane_state) ||
10675 old_plane_state->fb->format != plane_state->fb->format) {
10676 consider_mode_change = true;
10677 break;
10678 }
10679 }
10680
10681 if (!consider_mode_change && !crtc_state->zpos_changed) {
10682 return 0;
10683 }
10684
10685 /*
10686 * If no cursor change on this CRTC, and not enabled on this CRTC, then
10687 * no need to set cursor mode. This avoids needlessly locking the cursor
10688 * state.
10689 */
10690 if (!cursor_changed &&
10691 !(drm_plane_mask(crtc_state->crtc->cursor) & crtc_state->plane_mask)) {
10692 return 0;
10693 }
10694
10695 plane_state = drm_atomic_get_plane_state(state,
10696 crtc_state->crtc->cursor);
10697 if (IS_ERR(plane_state))
10698 return PTR_ERR(plane_state);
10699
10700 /* Cursor is disabled */
10701 if (!plane_state->fb)
10702 return 0;
10703
10704 cursor_zpos = plane_state->normalized_zpos;
10705
10706 /* Get enabled plane immediately below cursor. */
10707 target_plane_state = NULL;
10708 target_zpos = 0;
10709 drm_for_each_plane_mask(plane, state->dev, crtc_state->plane_mask) {
10710 if (plane->type == DRM_PLANE_TYPE_CURSOR)
10711 continue;
10712
10713 plane_state = drm_atomic_get_plane_state(state, plane);
10714 if (IS_ERR(plane_state))
10715 return PTR_ERR(plane_state);
10716
10717 if (!plane_state->fb ||
10718 plane_state->normalized_zpos >= cursor_zpos)
10719 continue;
10720
10721 if (plane_state->normalized_zpos >= target_zpos) {
10722 target_zpos = plane_state->normalized_zpos;
10723 target_plane_state = plane_state;
10724 }
10725 }
10726
10727 /* Nothing below cursor - use overlay mode */
10728 if (target_plane_state == NULL) {
10729 dm_crtc_state->cursor_mode = DM_CURSOR_OVERLAY_MODE;
10730 return 0;
10731 }
10732
10733 if (amdgpu_dm_plane_is_video_format(target_plane_state->fb->format->format)) {
10734 dm_crtc_state->cursor_mode = DM_CURSOR_OVERLAY_MODE;
10735 } else {
10736 dm_crtc_state->cursor_mode = DM_CURSOR_NATIVE_MODE;
10737 }
10738
10739 return 0;
10740 }
10741
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-03-16 8:38 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-15 17:09 [PATCH 0/2] drm/amdgpu/display: Make multi-plane configurations more flexible sunpeng.li
2024-03-15 17:09 ` [PATCH 1/2] drm/amd/display: Introduce overlay cursor mode sunpeng.li
2024-03-16 8:38 ` kernel test robot [this message]
2024-03-21 21:39 ` Harry Wentland
2024-03-28 15:16 ` Pekka Paalanen
2024-03-28 15:48 ` Robert Mader
2024-03-28 15:52 ` Harry Wentland
2024-04-01 14:38 ` Leo Li
2024-03-15 17:09 ` [PATCH 2/2] drm/amd/display: Move PRIMARY plane zpos higher sunpeng.li
2024-03-21 21:36 ` Harry Wentland
2024-03-28 15:20 ` Pekka Paalanen
2024-03-28 14:33 ` [PATCH 0/2] drm/amdgpu/display: Make multi-plane configurations more flexible Pekka Paalanen
2024-04-03 21:32 ` Leo Li
2024-04-04 10:24 ` Pekka Paalanen
2024-04-04 13:59 ` Harry Wentland
2024-04-04 14:22 ` Marius Vlad
2024-04-11 20:33 ` Leo Li
2024-04-12 8:03 ` Pekka Paalanen
2024-04-12 14:28 ` Leo Li
2024-04-12 15:07 ` Pekka Paalanen
2024-04-12 15:31 ` Alex Deucher
2024-04-12 20:14 ` Leo Li
2024-04-15 8:19 ` Pekka Paalanen
2024-04-15 22:33 ` Leo Li
2024-04-16 8:01 ` Pekka Paalanen
2024-04-16 14:10 ` Harry Wentland
2024-04-17 18:51 ` Leo Li
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=202403161600.6KspdesJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=Vikas.Korjani@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chao.guo@nxp.com \
--cc=contact@emersion.fr \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=joshua@froggi.es \
--cc=mdaenzer@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pekka.paalanen@collabora.com \
--cc=robert.mader@posteo.de \
--cc=sean@poorly.run \
--cc=sebastian.wick@redhat.com \
--cc=shashank.sharma@amd.com \
--cc=sunpeng.li@amd.com \
--cc=xaver.hugl@gmail.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 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.