Skip to contentSkip to conversation

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:958 amdgpu_dm_update_plane_color_mgmt() warn: inconsistent indenting

PATCH kernel test robot 1 participant 1 message Jan 5, 2024 Memory management

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   d0b3c8aa5e37775cd7c3ac07b256218df0fd6678
commit: ef113a3b1964b40dd87287806865b947d70f7df5 [7009/12403] drm/amd/display: reject atomic commit if setting both plane and CRTC degamma
config: x86_64-randconfig-161-20231228 (https://download.01.org/0day-ci/archive/20240105/[email protected]/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:958 amdgpu_dm_update_plane_color_mgmt() warn: inconsistent indenting

vim +958 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c

918
919 /**
920 * amdgpu_dm_update_plane_color_mgmt: Maps DRM color management to DC plane.
921 * @crtc: amdgpu_dm crtc state
922 * @plane_state: DRM plane state
923 * @dc_plane_state: target DC surface
924 *
925 * Update the underlying dc_stream_state's input transfer function (ITF) in
926 * preparation for hardware commit. The transfer function used depends on
927 * the preparation done on the stream for color management.
928 *
929 * Returns:
930 * 0 on success. -ENOMEM if mem allocation fails.
931 */
932 int amdgpu_dm_update_plane_color_mgmt(struct dm_crtc_state *crtc,
933 struct drm_plane_state *plane_state,
934 struct dc_plane_state *dc_plane_state)
935 {
936 bool has_crtc_cm_degamma;
937 int ret;
938
939 /* Initially, we can just bypass the DGM block. */
940 dc_plane_state->in_transfer_func->type = TF_TYPE_BYPASS;
941 dc_plane_state->in_transfer_func->tf = TRANSFER_FUNCTION_LINEAR;
942
943 /* After, we start to update values according to color props */
944 has_crtc_cm_degamma = (crtc->cm_has_degamma || crtc->cm_is_degamma_srgb);
945
946 ret = __set_dm_plane_degamma(plane_state, dc_plane_state);
947 if (ret == -ENOMEM)
948 return ret;
949
950 /* We only have one degamma block available (pre-blending) for the
951 * whole color correction pipeline, so that we can't actually perform
952 * plane and CRTC degamma at the same time. Explicitly reject atomic
953 * updates when userspace sets both plane and CRTC degamma properties.
954 */
955 if (has_crtc_cm_degamma && ret != -EINVAL){
956 drm_dbg_kms(crtc->base.crtc->dev,
957 "doesn't support plane and CRTC degamma at the same time\n");

 > 958				return -EINVAL;
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki