All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Louis Chauvet" <louis.chauvet@bootlin.com>,
	"Rodrigo Siqueira" <rodrigosiqueiramelo@gmail.com>,
	"Melissa Wen" <melissa.srw@gmail.com>,
	"Maíra Canal" <mairacanal@riseup.net>,
	"Haneen Mohammed" <hamohammed.sa@gmail.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>
Cc: oe-kbuild-all@lists.linux.dev, dri-devel@lists.freedesktop.org,
	arthurgrillo@riseup.net, linux-kernel@vger.kernel.org,
	jeremie.dautheribes@bootlin.com, miquel.raynal@bootlin.com,
	thomas.petazzoni@bootlin.com, seanpaul@google.com,
	nicolejadeyee@google.com,
	Louis Chauvet <louis.chauvet@bootlin.com>
Subject: Re: [PATCH v7 4/7] drm: writeback: Create an helper for drm_writeback_connector initialization
Date: Wed, 15 Jan 2025 09:22:43 +0800	[thread overview]
Message-ID: <202501150938.a3MspUwj-lkp@intel.com> (raw)
In-Reply-To: <20250113-google-vkms-managed-v7-4-4f81d1893e0b@bootlin.com>

Hi Louis,

kernel test robot noticed the following build warnings:

[auto build test WARNING on f8a2397baf041a5cee408b082334bb09c7e161df]

url:    https://github.com/intel-lab-lkp/linux/commits/Louis-Chauvet/drm-vkms-Switch-to-managed-for-connector/20250114-011112
base:   f8a2397baf041a5cee408b082334bb09c7e161df
patch link:    https://lore.kernel.org/r/20250113-google-vkms-managed-v7-4-4f81d1893e0b%40bootlin.com
patch subject: [PATCH v7 4/7] drm: writeback: Create an helper for drm_writeback_connector initialization
config: i386-randconfig-014-20250115 (https://download.01.org/0day-ci/archive/20250115/202501150938.a3MspUwj-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250115/202501150938.a3MspUwj-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/202501150938.a3MspUwj-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/drm_writeback.c: In function 'drm_writeback_connector_init_with_encoder':
>> drivers/gpu/drm/drm_writeback.c:321:35: warning: unused variable 'blob' [-Wunused-variable]
     321 |         struct drm_property_blob *blob;
         |                                   ^~~~
   drivers/gpu/drm/drm_writeback.c: At top level:
   drivers/gpu/drm/drm_writeback.c:348:13: warning: 'drm_writeback_connector_cleanup' defined but not used [-Wunused-function]
     348 | static void drm_writeback_connector_cleanup(struct drm_device *dev,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
>> drivers/gpu/drm/drm_writeback.c:243: warning: expecting prototype for drm_writeback_connector_init_with_encoder(). Prototype was for __drm_writeback_connector_init() instead


vim +/blob +321 drivers/gpu/drm/drm_writeback.c

   214	
   215	/**
   216	 * drm_writeback_connector_init_with_encoder - Initialize a writeback connector with
   217	 * a custom encoder
   218	 *
   219	 * @dev: DRM device
   220	 * @wb_connector: Writeback connector to initialize
   221	 * @enc: handle to the already initialized drm encoder
   222	 * @formats: Array of supported pixel formats for the writeback engine
   223	 * @n_formats: Length of the formats array
   224	 *
   225	 * This function creates the writeback-connector-specific properties if they
   226	 * have not been already created, initializes the connector as
   227	 * type DRM_MODE_CONNECTOR_WRITEBACK, and correctly initializes the property
   228	 * values.
   229	 *
   230	 * This function assumes that the drm_writeback_connector's encoder has already been
   231	 * created and initialized before invoking this function.
   232	 *
   233	 * In addition, this function also assumes that callers of this API will manage
   234	 * assigning the encoder helper functions, possible_crtcs and any other encoder
   235	 * specific operation.
   236	 *
   237	 * Returns: 0 on success, or a negative error code
   238	 */
   239	static int __drm_writeback_connector_init(struct drm_device *dev,
   240						  struct drm_writeback_connector *wb_connector,
   241						  struct drm_encoder *enc, const u32 *formats,
   242						  int n_formats)
 > 243	{
   244		struct drm_connector *connector = &wb_connector->base;
   245		struct drm_mode_config *config = &dev->mode_config;
   246		struct drm_property_blob *blob;
   247		int ret = create_writeback_properties(dev);
   248	
   249		if (ret != 0)
   250			return ret;
   251	
   252		connector->interlace_allowed = 0;
   253	
   254		ret = drm_connector_attach_encoder(connector, enc);
   255		if (ret)
   256			return ret;
   257	
   258		blob = drm_property_create_blob(dev, n_formats * sizeof(*formats),
   259						formats);
   260		if (IS_ERR(blob))
   261			return PTR_ERR(blob);
   262	
   263		INIT_LIST_HEAD(&wb_connector->job_queue);
   264		spin_lock_init(&wb_connector->job_lock);
   265	
   266		wb_connector->fence_context = dma_fence_context_alloc(1);
   267		spin_lock_init(&wb_connector->fence_lock);
   268		snprintf(wb_connector->timeline_name,
   269			 sizeof(wb_connector->timeline_name),
   270			 "CONNECTOR:%d-%s", connector->base.id, connector->name);
   271	
   272		drm_object_attach_property(&connector->base,
   273					   config->writeback_out_fence_ptr_property, 0);
   274	
   275		drm_object_attach_property(&connector->base,
   276					   config->writeback_fb_id_property, 0);
   277	
   278		drm_object_attach_property(&connector->base,
   279					   config->writeback_pixel_formats_property,
   280					   blob->base.id);
   281		wb_connector->pixel_formats_blob_ptr = blob;
   282	
   283		return 0;
   284	}
   285	
   286	/**
   287	 * drm_writeback_connector_init_with_encoder - Initialize a writeback connector with
   288	 * a custom encoder
   289	 *
   290	 * @dev: DRM device
   291	 * @wb_connector: Writeback connector to initialize
   292	 * @enc: handle to the already initialized drm encoder
   293	 * @con_funcs: Connector funcs vtable
   294	 * @formats: Array of supported pixel formats for the writeback engine
   295	 * @n_formats: Length of the formats array
   296	 *
   297	 * This function creates the writeback-connector-specific properties if they
   298	 * have not been already created, initializes the connector as
   299	 * type DRM_MODE_CONNECTOR_WRITEBACK, and correctly initializes the property
   300	 * values.
   301	 *
   302	 * This function assumes that the drm_writeback_connector's encoder has already been
   303	 * created and initialized before invoking this function.
   304	 *
   305	 * In addition, this function also assumes that callers of this API will manage
   306	 * assigning the encoder helper functions, possible_crtcs and any other encoder
   307	 * specific operation.
   308	 *
   309	 * Drivers should always use this function instead of drm_connector_init() to
   310	 * set up writeback connectors if they want to manage themselves the lifetime of the
   311	 * associated encoder.
   312	 *
   313	 * Returns: 0 on success, or a negative error code
   314	 */
   315	int drm_writeback_connector_init_with_encoder(struct drm_device *dev,
   316						      struct drm_writeback_connector *wb_connector,
   317						      struct drm_encoder *enc,
   318						      const struct drm_connector_funcs *con_funcs,
   319						      const u32 *formats, int n_formats)
   320	{
 > 321		struct drm_property_blob *blob;
   322		struct drm_connector *connector = &wb_connector->base;
   323		int ret;
   324	
   325		ret = drm_connector_init(dev, connector, con_funcs,
   326					 DRM_MODE_CONNECTOR_WRITEBACK);
   327		if (ret)
   328			return ret;
   329	
   330		ret = __drm_writeback_connector_init(dev, wb_connector, enc, formats,
   331						     n_formats);
   332		if (ret)
   333			drm_connector_cleanup(connector);
   334	
   335		return ret;
   336	}
   337	EXPORT_SYMBOL(drm_writeback_connector_init_with_encoder);
   338	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2025-01-15  1:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-13 17:09 [PATCH v7 0/7] drm/vkms: Switch all vkms object to DRM managed objects Louis Chauvet
2025-01-13 17:09 ` [PATCH v7 1/7] drm/vkms: Switch to managed for connector Louis Chauvet
2025-01-14  8:54   ` Thomas Zimmermann
2025-01-13 17:09 ` [PATCH v7 2/7] drm/vkms: Switch to managed for encoder Louis Chauvet
2025-01-14  8:56   ` Thomas Zimmermann
2025-01-13 17:09 ` [PATCH v7 3/7] drm/vkms: Switch to managed for crtc Louis Chauvet
2025-01-14  9:06   ` Thomas Zimmermann
2025-01-14 13:19     ` Louis Chauvet
2025-01-14 13:25       ` Thomas Zimmermann
2025-01-13 17:09 ` [PATCH v7 4/7] drm: writeback: Create an helper for drm_writeback_connector initialization Louis Chauvet
2025-01-15  1:22   ` kernel test robot [this message]
2025-01-13 17:09 ` [PATCH v7 5/7] drm: writeback: Add missing cleanup in case of initialization failure Louis Chauvet
2025-01-13 17:09 ` [PATCH v7 6/7] drm: writeback: Create drmm variants for drm_writeback_connector initialization Louis Chauvet
2025-01-13 17:09 ` [PATCH v7 7/7] drm/vkms: Switch to managed for writeback connector Louis Chauvet
2025-01-13 17:12   ` Louis Chauvet
2025-01-16 15:53     ` José Expósito

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=202501150938.a3MspUwj-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@gmail.com \
    --cc=arthurgrillo@riseup.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=jeremie.dautheribes@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=louis.chauvet@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mairacanal@riseup.net \
    --cc=melissa.srw@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=mripard@kernel.org \
    --cc=nicolejadeyee@google.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rodrigosiqueiramelo@gmail.com \
    --cc=seanpaul@google.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.petazzoni@bootlin.com \
    --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: 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.