diff mbox

[06/18] drm: Add color correction blobs in CRTC state

Message ID 1438879107-22819-7-git-send-email-shashank.sharma@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sharma, Shashank Aug. 6, 2015, 4:38 p.m. UTC
From: Kausal Malladi <kausalmalladi@gmail.com>

This patch adds new variables in CRTC state, to hold respective color
correction blobs. These blobs will be required during the atomic commit
for writing the color correction values in correction registers.

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Kausal Malladi <kausalmalladi@gmail.com>
---
 include/drm/drm_crtc.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Matt Roper Aug. 21, 2015, 10:40 p.m. UTC | #1
On Thu, Aug 06, 2015 at 10:08:15PM +0530, Shashank Sharma wrote:
> From: Kausal Malladi <kausalmalladi@gmail.com>
> 
> This patch adds new variables in CRTC state, to hold respective color
> correction blobs. These blobs will be required during the atomic commit
> for writing the color correction values in correction registers.
> 
> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> Signed-off-by: Kausal Malladi <kausalmalladi@gmail.com>

Since these are part of the state now, I believe you also need to add a
drm_property_reference_blob() call in
__drm_atomic_helper_crtc_duplicate_state and a
drm_property_unreference_blob() call in
__drm_atomic_helper_crtc_destroy_state so that we properly
increment/decrement the reference count as the state gets
duplicated/destroyed.  I don't see that later in the series, so this
might be the best patch to add it to.


Matt

> ---
>  include/drm/drm_crtc.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 3c59045..504539a 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -304,6 +304,11 @@ struct drm_crtc_state {
>  	/* blob property to expose current mode to atomic userspace */
>  	struct drm_property_blob *mode_blob;
>  
> +	/* blob properties to hold the color properties' blobs */
> +	struct drm_property_blob *palette_before_ctm_blob;
> +	struct drm_property_blob *palette_after_ctm_blob;
> +	struct drm_property_blob *ctm_blob;
> +
>  	struct drm_pending_vblank_event *event;
>  
>  	struct drm_atomic_state *state;
> -- 
> 1.9.1
>
Sharma, Shashank Aug. 22, 2015, 6:09 a.m. UTC | #2
Regards
Shashank

On 8/22/2015 4:10 AM, Matt Roper wrote:
> On Thu, Aug 06, 2015 at 10:08:15PM +0530, Shashank Sharma wrote:
>> From: Kausal Malladi <kausalmalladi@gmail.com>
>>
>> This patch adds new variables in CRTC state, to hold respective color
>> correction blobs. These blobs will be required during the atomic commit
>> for writing the color correction values in correction registers.
>>
>> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
>> Signed-off-by: Kausal Malladi <kausalmalladi@gmail.com>
>
> Since these are part of the state now, I believe you also need to add a
> drm_property_reference_blob() call in
> __drm_atomic_helper_crtc_duplicate_state and a
> drm_property_unreference_blob() call in
> __drm_atomic_helper_crtc_destroy_state so that we properly
> increment/decrement the reference count as the state gets
> duplicated/destroyed.  I don't see that later in the series, so this
> might be the best patch to add it to.
>
>
> Matt
Oops, agree. Will add this.
>
>> ---
>>   include/drm/drm_crtc.h | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
>> index 3c59045..504539a 100644
>> --- a/include/drm/drm_crtc.h
>> +++ b/include/drm/drm_crtc.h
>> @@ -304,6 +304,11 @@ struct drm_crtc_state {
>>   	/* blob property to expose current mode to atomic userspace */
>>   	struct drm_property_blob *mode_blob;
>>
>> +	/* blob properties to hold the color properties' blobs */
>> +	struct drm_property_blob *palette_before_ctm_blob;
>> +	struct drm_property_blob *palette_after_ctm_blob;
>> +	struct drm_property_blob *ctm_blob;
>> +
>>   	struct drm_pending_vblank_event *event;
>>
>>   	struct drm_atomic_state *state;
>> --
>> 1.9.1
>>
>
diff mbox

Patch

diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 3c59045..504539a 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -304,6 +304,11 @@  struct drm_crtc_state {
 	/* blob property to expose current mode to atomic userspace */
 	struct drm_property_blob *mode_blob;
 
+	/* blob properties to hold the color properties' blobs */
+	struct drm_property_blob *palette_before_ctm_blob;
+	struct drm_property_blob *palette_after_ctm_blob;
+	struct drm_property_blob *ctm_blob;
+
 	struct drm_pending_vblank_event *event;
 
 	struct drm_atomic_state *state;