diff mbox series

[v7,2/7] drm/client: Always select DRM_CLIENT_LIB

Message ID 20241108082025.1004653-3-jfalempe@redhat.com (mailing list archive)
State New, archived
Headers show
Series drm/log: Introduce a new boot logger to draw the kmsg on the screen | expand

Commit Message

Jocelyn Falempe Nov. 8, 2024, 8:10 a.m. UTC
DRM_CLIENT_LIB has the code to select the client at runtime, so it should be
always selected by DRM_CLIENT_SELECTION.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
---

v7:
 * Added in v7, to fix a build issue, if DRM_LOG is enabled but DRM_CLIENT_LIB is not.
 
 drivers/gpu/drm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

kernel test robot Nov. 8, 2024, 11:56 a.m. UTC | #1
Hi Jocelyn,

kernel test robot noticed the following build errors:

[auto build test ERROR on baf4afc5831438b35de4b0e951b9cd58435a6d99]

url:    https://github.com/intel-lab-lkp/linux/commits/Jocelyn-Falempe/drm-panic-Move-drawing-functions-to-drm_draw/20241108-162222
base:   baf4afc5831438b35de4b0e951b9cd58435a6d99
patch link:    https://lore.kernel.org/r/20241108082025.1004653-3-jfalempe%40redhat.com
patch subject: [PATCH v7 2/7] drm/client: Always select DRM_CLIENT_LIB
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20241108/202411081923.vkZSFxL2-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241108/202411081923.vkZSFxL2-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/202411081923.vkZSFxL2-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/drm_client_setup.c:25:6: error: redefinition of 'drm_client_setup'
      25 | void drm_client_setup(struct drm_device *dev, const struct drm_format_info *format)
         |      ^~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/drm_client_setup.c:3:
   include/drm/drm_client_setup.h:16:20: note: previous definition of 'drm_client_setup' with type 'void(struct drm_device *, const struct drm_format_info *)'
      16 | static inline void drm_client_setup(struct drm_device *dev,
         |                    ^~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_client_setup.c:43:6: error: redefinition of 'drm_client_setup_with_fourcc'
      43 | void drm_client_setup_with_fourcc(struct drm_device *dev, u32 fourcc)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/drm_client_setup.c:3:
   include/drm/drm_client_setup.h:19:20: note: previous definition of 'drm_client_setup_with_fourcc' with type 'void(struct drm_device *, u32)' {aka 'void(struct drm_device *, unsigned int)'}
      19 | static inline void drm_client_setup_with_fourcc(struct drm_device *dev, u32 fourcc)
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_client_setup.c:60:6: error: redefinition of 'drm_client_setup_with_color_mode'
      60 | void drm_client_setup_with_color_mode(struct drm_device *dev, unsigned int color_mode)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/drm_client_setup.c:3:
   include/drm/drm_client_setup.h:21:20: note: previous definition of 'drm_client_setup_with_color_mode' with type 'void(struct drm_device *, unsigned int)'
      21 | static inline void drm_client_setup_with_color_mode(struct drm_device *dev,
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/drm_client_setup +25 drivers/gpu/drm/drm_client_setup.c

d07fdf9225922d Thomas Zimmermann 2024-09-24   8  
d07fdf9225922d Thomas Zimmermann 2024-09-24   9  /**
d07fdf9225922d Thomas Zimmermann 2024-09-24  10   * drm_client_setup() - Setup in-kernel DRM clients
d07fdf9225922d Thomas Zimmermann 2024-09-24  11   * @dev: DRM device
d07fdf9225922d Thomas Zimmermann 2024-09-24  12   * @format: Preferred pixel format for the device. Use NULL, unless
d07fdf9225922d Thomas Zimmermann 2024-09-24  13   *          there is clearly a driver-preferred format.
d07fdf9225922d Thomas Zimmermann 2024-09-24  14   *
d07fdf9225922d Thomas Zimmermann 2024-09-24  15   * This function sets up the in-kernel DRM clients. Restore, hotplug
d07fdf9225922d Thomas Zimmermann 2024-09-24  16   * events and teardown are all taken care of.
d07fdf9225922d Thomas Zimmermann 2024-09-24  17   *
d07fdf9225922d Thomas Zimmermann 2024-09-24  18   * Drivers should call drm_client_setup() after registering the new
d07fdf9225922d Thomas Zimmermann 2024-09-24  19   * DRM device with drm_dev_register(). This function is safe to call
d07fdf9225922d Thomas Zimmermann 2024-09-24  20   * even when there are no connectors present. Setup will be retried
d07fdf9225922d Thomas Zimmermann 2024-09-24  21   * on the next hotplug event.
d07fdf9225922d Thomas Zimmermann 2024-09-24  22   *
d07fdf9225922d Thomas Zimmermann 2024-09-24  23   * The clients are destroyed by drm_dev_unregister().
d07fdf9225922d Thomas Zimmermann 2024-09-24  24   */
d07fdf9225922d Thomas Zimmermann 2024-09-24 @25  void drm_client_setup(struct drm_device *dev, const struct drm_format_info *format)
d07fdf9225922d Thomas Zimmermann 2024-09-24  26  {
d07fdf9225922d Thomas Zimmermann 2024-09-24  27  	int ret;
d07fdf9225922d Thomas Zimmermann 2024-09-24  28  
d07fdf9225922d Thomas Zimmermann 2024-09-24  29  	ret = drm_fbdev_client_setup(dev, format);
d07fdf9225922d Thomas Zimmermann 2024-09-24  30  	if (ret)
d07fdf9225922d Thomas Zimmermann 2024-09-24  31  		drm_warn(dev, "Failed to set up DRM client; error %d\n", ret);
d07fdf9225922d Thomas Zimmermann 2024-09-24  32  }
d07fdf9225922d Thomas Zimmermann 2024-09-24  33  EXPORT_SYMBOL(drm_client_setup);
d07fdf9225922d Thomas Zimmermann 2024-09-24  34  
d07fdf9225922d Thomas Zimmermann 2024-09-24  35  /**
d07fdf9225922d Thomas Zimmermann 2024-09-24  36   * drm_client_setup_with_fourcc() - Setup in-kernel DRM clients for color mode
d07fdf9225922d Thomas Zimmermann 2024-09-24  37   * @dev: DRM device
d07fdf9225922d Thomas Zimmermann 2024-09-24  38   * @fourcc: Preferred pixel format as 4CC code for the device
d07fdf9225922d Thomas Zimmermann 2024-09-24  39   *
d07fdf9225922d Thomas Zimmermann 2024-09-24  40   * This function sets up the in-kernel DRM clients. It is equivalent
d07fdf9225922d Thomas Zimmermann 2024-09-24  41   * to drm_client_setup(), but expects a 4CC code as second argument.
d07fdf9225922d Thomas Zimmermann 2024-09-24  42   */
d07fdf9225922d Thomas Zimmermann 2024-09-24 @43  void drm_client_setup_with_fourcc(struct drm_device *dev, u32 fourcc)
d07fdf9225922d Thomas Zimmermann 2024-09-24  44  {
d07fdf9225922d Thomas Zimmermann 2024-09-24  45  	drm_client_setup(dev, drm_format_info(fourcc));
d07fdf9225922d Thomas Zimmermann 2024-09-24  46  }
d07fdf9225922d Thomas Zimmermann 2024-09-24  47  EXPORT_SYMBOL(drm_client_setup_with_fourcc);
d07fdf9225922d Thomas Zimmermann 2024-09-24  48  
d07fdf9225922d Thomas Zimmermann 2024-09-24  49  /**
d07fdf9225922d Thomas Zimmermann 2024-09-24  50   * drm_client_setup_with_color_mode() - Setup in-kernel DRM clients for color mode
d07fdf9225922d Thomas Zimmermann 2024-09-24  51   * @dev: DRM device
d07fdf9225922d Thomas Zimmermann 2024-09-24  52   * @color_mode: Preferred color mode for the device
d07fdf9225922d Thomas Zimmermann 2024-09-24  53   *
d07fdf9225922d Thomas Zimmermann 2024-09-24  54   * This function sets up the in-kernel DRM clients. It is equivalent
d07fdf9225922d Thomas Zimmermann 2024-09-24  55   * to drm_client_setup(), but expects a color mode as second argument.
d07fdf9225922d Thomas Zimmermann 2024-09-24  56   *
d07fdf9225922d Thomas Zimmermann 2024-09-24  57   * Do not use this function in new drivers. Prefer drm_client_setup() with a
d07fdf9225922d Thomas Zimmermann 2024-09-24  58   * format of NULL.
d07fdf9225922d Thomas Zimmermann 2024-09-24  59   */
d07fdf9225922d Thomas Zimmermann 2024-09-24 @60  void drm_client_setup_with_color_mode(struct drm_device *dev, unsigned int color_mode)
d07fdf9225922d Thomas Zimmermann 2024-09-24  61  {
d07fdf9225922d Thomas Zimmermann 2024-09-24  62  	u32 fourcc = drm_driver_color_mode_format(dev, color_mode);
d07fdf9225922d Thomas Zimmermann 2024-09-24  63  
d07fdf9225922d Thomas Zimmermann 2024-09-24  64  	drm_client_setup_with_fourcc(dev, fourcc);
d07fdf9225922d Thomas Zimmermann 2024-09-24  65  }
d07fdf9225922d Thomas Zimmermann 2024-09-24  66  EXPORT_SYMBOL(drm_client_setup_with_color_mode);
dadd28d4142f9a Thomas Zimmermann 2024-10-14  67
diff mbox series

Patch

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 3f16dca0b6643..eabedfc11061c 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -234,7 +234,7 @@  config DRM_CLIENT_LIB
 config DRM_CLIENT_SELECTION
 	tristate
 	depends on DRM
-	select DRM_CLIENT_LIB if DRM_FBDEV_EMULATION
+	select DRM_CLIENT_LIB
 	help
 	  Drivers that support in-kernel DRM clients have to select this
 	  option.