AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	<dri-devel@lists.freedesktop.org>,
	<intel-gfx@lists.freedesktop.org>,
	<intel-xe@lists.freedesktop.org>, <amd-gfx@lists.freedesktop.org>
Cc: <harry.wentland@amd.com>, <louis.chauvet@bootlin.com>,
	<mwen@igalia.com>,  <contact@emersion.fr>, <alex.hung@amd.com>,
	<daniels@collabora.com>, <uma.shankar@intel.com>,
	<suraj.kandpal@intel.com>, <nfraprado@collabora.com>,
	<ville.syrjala@linux.intel.com>, <matthew.d.roper@intel.com>
Subject: Re: [PATCH v2 05/13] drm/colorop: Add destroy helper for colorop objects
Date: Tue, 13 Jan 2026 16:23:10 +0530	[thread overview]
Message-ID: <76400db2-4bbc-4b5f-a1b2-497dabc9ee73@intel.com> (raw)
In-Reply-To: <bd769e61d261899ada538818b5a3923070ba2b72@intel.com>



On 1/12/2026 4:53 PM, Jani Nikula wrote:
> On Fri, 09 Jan 2026, Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> wrote:
>> Add a helper that performs common cleanup and frees the
>> associated object. This can be used by drivers if they do not
>> require any driver-specific teardown.
>>
>> Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
>> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
>> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
>> Reviewed-by: Alex Hung <alex.hung@amd.com>
>> ---
>>   drivers/gpu/drm/drm_colorop.c | 12 ++++++++++++
>>   include/drm/drm_colorop.h     | 10 ++++++++++
>>   2 files changed, 22 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c
>> index 44eb823585d2..ba19a3ab23cb 100644
>> --- a/drivers/gpu/drm/drm_colorop.c
>> +++ b/drivers/gpu/drm/drm_colorop.c
>> @@ -178,6 +178,18 @@ void drm_colorop_cleanup(struct drm_colorop *colorop)
>>   }
>>   EXPORT_SYMBOL(drm_colorop_cleanup);
>>   
>> +/**
>> + * drm_colorop_destroy() - Helper for colorop destruction
>> + *
>> + * @colorop: colorop to destroy
>> + */
>> +void drm_colorop_destroy(struct drm_colorop *colorop)
>> +{
>> +	drm_colorop_cleanup(colorop);
>> +	kfree(colorop);
>> +}
>> +EXPORT_SYMBOL(drm_colorop_destroy);
>> +
>>   /**
>>    * drm_colorop_pipeline_destroy - Helper for color pipeline destruction
>>    *
>> diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h
>> index a3a32f9f918c..0f5ba72c1704 100644
>> --- a/include/drm/drm_colorop.h
>> +++ b/include/drm/drm_colorop.h
>> @@ -420,6 +420,16 @@ void drm_colorop_atomic_destroy_state(struct drm_colorop *colorop,
>>    */
>>   void drm_colorop_reset(struct drm_colorop *colorop);
>>   
>> +/**
>> + * drm_colorop_destroy - destroy colorop
>> + * @colorop: drm colorop
>> + *
>> + * Destroys @colorop by performing common DRM cleanup and freeing the
>> + * colorop object. This can be used by drivers if they do not
>> + * require any driver-specific teardown.
>> + */
> 
> The kernel-doc should be with the function definition, not at the
> declaration, and certainly not both.
> 

Thank you, Jani, for pointing it out. I have removed it in v3.

Regards
Chaitanya

> BR,
> Jani.
> 
>> +void drm_colorop_destroy(struct drm_colorop *colorop);
>> +
>>   /**
>>    * drm_colorop_index - find the index of a registered colorop
>>    * @colorop: colorop to find index for
> 


  reply	other threads:[~2026-01-13 10:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09  8:17 [PATCH v2 00/13] drm: Color pipeline teardown and follow-up fixes/improvements Chaitanya Kumar Borah
2026-01-09  8:17 ` [PATCH v2 01/13] drm/i915/color: Place 3D LUT after CSC in plane color pipeline Chaitanya Kumar Borah
2026-01-09  8:17 ` [PATCH v2 02/13] drm/amd/display: Fix color pipeline enum name leak Chaitanya Kumar Borah
2026-01-09  8:17 ` [PATCH v2 03/13] drm/vkms: " Chaitanya Kumar Borah
2026-01-12 14:31   ` Louis Chauvet
2026-01-09  8:17 ` [PATCH v2 04/13] drm/i915/display: " Chaitanya Kumar Borah
2026-01-09  8:17 ` [PATCH v2 05/13] drm/colorop: Add destroy helper for colorop objects Chaitanya Kumar Borah
2026-01-12 11:23   ` Jani Nikula
2026-01-13 10:53     ` Borah, Chaitanya Kumar [this message]
2026-01-09  8:17 ` [PATCH v2 06/13] drm: Allow driver-managed destruction of " Chaitanya Kumar Borah
2026-01-09  8:17 ` [PATCH v2 07/13] drm/amd/display: Hook up colorop destroy helper for plane pipelines Chaitanya Kumar Borah
2026-01-09  8:17 ` [PATCH v2 08/13] drm/vkms: " Chaitanya Kumar Borah
2026-01-12 14:33   ` Louis Chauvet
2026-01-09  8:17 ` [PATCH v2 09/13] drm/i915/display: Hook up intel_colorop_destroy Chaitanya Kumar Borah
2026-01-09  8:17 ` [PATCH v2 10/13] drm: Clean up colorop objects during mode_config cleanup Chaitanya Kumar Borah
2026-01-09  8:17 ` [PATCH v2 11/13] drm/vkms: Remove drm_colorop_pipeline_destroy() from vkms_destroy() Chaitanya Kumar Borah
2026-01-12 14:33   ` Louis Chauvet
2026-01-09  8:17 ` [PATCH v2 12/13] drm/colorop: Use destroy callback for color pipeline teardown Chaitanya Kumar Borah
2026-01-09  8:17 ` [PATCH v2 13/13] drm/i915/color: Add failure handling in plane color pipeline init Chaitanya Kumar Borah
2026-01-09  9:20   ` Kandpal, Suraj

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=76400db2-4bbc-4b5f-a1b2-497dabc9ee73@intel.com \
    --to=chaitanya.kumar.borah@intel.com \
    --cc=alex.hung@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=contact@emersion.fr \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=louis.chauvet@bootlin.com \
    --cc=matthew.d.roper@intel.com \
    --cc=mwen@igalia.com \
    --cc=nfraprado@collabora.com \
    --cc=suraj.kandpal@intel.com \
    --cc=uma.shankar@intel.com \
    --cc=ville.syrjala@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox