Message ID | 20221212182137.374625-8-harry.wentland@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Enable Colorspace connector property in amdgpu | expand |
Hi Harry, I love your patch! Perhaps something to improve: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on drm/drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes linus/master v6.1 next-20221208] [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/Harry-Wentland/Enable-Colorspace-connector-property-in-amdgpu/20221213-022441 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20221212182137.374625-8-harry.wentland%40amd.com patch subject: [PATCH 07/16] drm/connector: Print connector colorspace in state debugfs config: m68k-allyesconfig compiler: m68k-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/b1c067d0fea29d9a9b45ba696e20c93841925f8d git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Harry-Wentland/Enable-Colorspace-connector-property-in-amdgpu/20221213-022441 git checkout b1c067d0fea29d9a9b45ba696e20c93841925f8d # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/gpu/drm/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): drivers/gpu/drm/drm_connector.c:1081: warning: Function parameter or member 'colorspace' not described in 'drm_get_colorspace_name' >> drivers/gpu/drm/drm_connector.c:1081: warning: expecting prototype for drm_get_color_encoding_name(). Prototype was for drm_get_colorspace_name() instead drivers/gpu/drm/drm_connector.c:1857: warning: bad line: drivers/gpu/drm/drm_connector.c:2180: warning: Function parameter or member 'supported_colorspaces' not described in 'drm_mode_create_hdmi_colorspace_property' drivers/gpu/drm/drm_connector.c:2199: warning: Function parameter or member 'supported_colorspaces' not described in 'drm_mode_create_dp_colorspace_property' vim +1081 drivers/gpu/drm/drm_connector.c 1072 1073 /** 1074 * drm_get_color_encoding_name - return a string for color encoding 1075 * @encoding: color encoding to compute name of 1076 * 1077 * In contrast to the other drm_get_*_name functions this one here returns a 1078 * const pointer and hence is threadsafe. 1079 */ 1080 const char *drm_get_colorspace_name(enum drm_colorspace colorspace) > 1081 { 1082 if (WARN_ON(colorspace >= ARRAY_SIZE(colorspace_names))) 1083 return "unknown"; 1084 1085 return colorspace_names[colorspace]; 1086 } 1087
Hi Harry, I love your patch! Perhaps something to improve: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on drm/drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes linus/master v6.1 next-20221208] [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/Harry-Wentland/Enable-Colorspace-connector-property-in-amdgpu/20221213-022441 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20221212182137.374625-8-harry.wentland%40amd.com patch subject: [PATCH 07/16] drm/connector: Print connector colorspace in state debugfs config: x86_64-randconfig-a002-20221212 compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/b1c067d0fea29d9a9b45ba696e20c93841925f8d git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Harry-Wentland/Enable-Colorspace-connector-property-in-amdgpu/20221213-022441 git checkout b1c067d0fea29d9a9b45ba696e20c93841925f8d # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): drivers/gpu/drm/drm_connector.c:1081: warning: Function parameter or member 'colorspace' not described in 'drm_get_colorspace_name' >> drivers/gpu/drm/drm_connector.c:1081: warning: expecting prototype for drm_get_color_encoding_name(). Prototype was for drm_get_colorspace_name() instead drivers/gpu/drm/drm_connector.c:1857: warning: bad line: drivers/gpu/drm/drm_connector.c:2180: warning: Function parameter or member 'supported_colorspaces' not described in 'drm_mode_create_hdmi_colorspace_property' drivers/gpu/drm/drm_connector.c:2199: warning: Function parameter or member 'supported_colorspaces' not described in 'drm_mode_create_dp_colorspace_property' vim +1081 drivers/gpu/drm/drm_connector.c 1072 1073 /** 1074 * drm_get_color_encoding_name - return a string for color encoding 1075 * @encoding: color encoding to compute name of 1076 * 1077 * In contrast to the other drm_get_*_name functions this one here returns a 1078 * const pointer and hence is threadsafe. 1079 */ 1080 const char *drm_get_colorspace_name(enum drm_colorspace colorspace) > 1081 { 1082 if (WARN_ON(colorspace >= ARRAY_SIZE(colorspace_names))) 1083 return "unknown"; 1084 1085 return colorspace_names[colorspace]; 1086 } 1087
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index c0dc5858a723..d6d04c4ccfc0 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1071,6 +1071,7 @@ static void drm_atomic_connector_print_state(struct drm_printer *p, drm_printf(p, "\tcrtc=%s\n", state->crtc ? state->crtc->name : "(null)"); drm_printf(p, "\tself_refresh_aware=%d\n", state->self_refresh_aware); drm_printf(p, "\tmax_requested_bpc=%d\n", state->max_requested_bpc); + drm_printf(p, "\tcolorspace=%s\n", drm_get_colorspace_name(state->colorspace)); if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK) if (state->writeback_job && state->writeback_job->fb) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 0df5db3e4fec..2305eddcd0d4 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -1031,6 +1031,21 @@ static const char * const colorspace_names[] = { [DRM_MODE_COLORIMETRY_BT601_YCC] = "BT601_YCC", }; +/** + * drm_get_color_encoding_name - return a string for color encoding + * @encoding: color encoding to compute name of + * + * In contrast to the other drm_get_*_name functions this one here returns a + * const pointer and hence is threadsafe. + */ +const char *drm_get_colorspace_name(enum drm_colorspace colorspace) +{ + if (WARN_ON(colorspace >= ARRAY_SIZE(colorspace_names))) + return "unknown"; + + return colorspace_names[colorspace]; +} + static const u32 hdmi_colorspaces = BIT(DRM_MODE_COLORIMETRY_SMPTE_170M_YCC) | BIT(DRM_MODE_COLORIMETRY_BT709_YCC) | diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 5825c6ab969b..545eb6eb456a 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -1906,6 +1906,7 @@ void drm_connector_list_iter_end(struct drm_connector_list_iter *iter); bool drm_connector_has_possible_encoder(struct drm_connector *connector, struct drm_encoder *encoder); +const char *drm_get_colorspace_name(enum drm_colorspace colorspace); /** * drm_for_each_connector_iter - connector_list iterator macro
Signed-off-by: Harry Wentland <harry.wentland@amd.com> Cc: Pekka Paalanen <ppaalanen@gmail.com> Cc: Sebastian Wick <sebastian.wick@redhat.com> Cc: Vitaly.Prosyak@amd.com Cc: Uma Shankar <uma.shankar@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Joshua Ashton <joshua@froggi.es> Cc: dri-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org --- drivers/gpu/drm/drm_atomic.c | 1 + drivers/gpu/drm/drm_connector.c | 15 +++++++++++++++ include/drm/drm_connector.h | 1 + 3 files changed, 17 insertions(+)