diff mbox series

[1/7] drm/i915/display: support struct intel_atomic_state in to_intel_display()

Message ID 20240813164123.2674462-1-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/7] drm/i915/display: support struct intel_atomic_state in to_intel_display() | expand

Commit Message

Jani Nikula Aug. 13, 2024, 4:41 p.m. UTC
Add support for converting struct intel_atomic_state pointers to struct
intel_display pointers.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_types.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Rodrigo Vivi Aug. 15, 2024, 7:03 p.m. UTC | #1
On Tue, Aug 13, 2024 at 07:41:17PM +0300, Jani Nikula wrote:
> Add support for converting struct intel_atomic_state pointers to struct
> intel_display pointers.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display_types.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index ea6548ceab2f..bd290536a1b7 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -2206,6 +2206,8 @@ to_intel_frontbuffer(struct drm_framebuffer *fb)
>   */
>  #define __drm_device_to_intel_display(p) \
>  	(&to_i915(p)->display)
> +#define __intel_atomic_state_to_intel_display(p)	\
> +	__drm_device_to_intel_display((p)->base.dev)
>  #define __intel_connector_to_intel_display(p)		\
>  	__drm_device_to_intel_display((p)->base.dev)
>  #define __intel_crtc_to_intel_display(p)		\
> @@ -2229,6 +2231,7 @@ to_intel_frontbuffer(struct drm_framebuffer *fb)
>  #define to_intel_display(p)				\
>  	_Generic(*p,					\
>  		 __assoc(drm_device, p),		\
> +		 __assoc(intel_atomic_state, p),	\
>  		 __assoc(intel_connector, p),		\
>  		 __assoc(intel_crtc, p),		\
>  		 __assoc(intel_crtc_state, p),		\
> -- 
> 2.39.2
>
Jani Nikula Aug. 16, 2024, 8:22 a.m. UTC | #2
On Thu, 15 Aug 2024, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> On Tue, Aug 13, 2024 at 07:41:17PM +0300, Jani Nikula wrote:
>> Add support for converting struct intel_atomic_state pointers to struct
>> intel_display pointers.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Thanks for the reviews, pushed to din.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/display/intel_display_types.h | 3 +++
>>  1 file changed, 3 insertions(+)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
>> index ea6548ceab2f..bd290536a1b7 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
>> @@ -2206,6 +2206,8 @@ to_intel_frontbuffer(struct drm_framebuffer *fb)
>>   */
>>  #define __drm_device_to_intel_display(p) \
>>  	(&to_i915(p)->display)
>> +#define __intel_atomic_state_to_intel_display(p)	\
>> +	__drm_device_to_intel_display((p)->base.dev)
>>  #define __intel_connector_to_intel_display(p)		\
>>  	__drm_device_to_intel_display((p)->base.dev)
>>  #define __intel_crtc_to_intel_display(p)		\
>> @@ -2229,6 +2231,7 @@ to_intel_frontbuffer(struct drm_framebuffer *fb)
>>  #define to_intel_display(p)				\
>>  	_Generic(*p,					\
>>  		 __assoc(drm_device, p),		\
>> +		 __assoc(intel_atomic_state, p),	\
>>  		 __assoc(intel_connector, p),		\
>>  		 __assoc(intel_crtc, p),		\
>>  		 __assoc(intel_crtc_state, p),		\
>> -- 
>> 2.39.2
>>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index ea6548ceab2f..bd290536a1b7 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -2206,6 +2206,8 @@  to_intel_frontbuffer(struct drm_framebuffer *fb)
  */
 #define __drm_device_to_intel_display(p) \
 	(&to_i915(p)->display)
+#define __intel_atomic_state_to_intel_display(p)	\
+	__drm_device_to_intel_display((p)->base.dev)
 #define __intel_connector_to_intel_display(p)		\
 	__drm_device_to_intel_display((p)->base.dev)
 #define __intel_crtc_to_intel_display(p)		\
@@ -2229,6 +2231,7 @@  to_intel_frontbuffer(struct drm_framebuffer *fb)
 #define to_intel_display(p)				\
 	_Generic(*p,					\
 		 __assoc(drm_device, p),		\
+		 __assoc(intel_atomic_state, p),	\
 		 __assoc(intel_connector, p),		\
 		 __assoc(intel_crtc, p),		\
 		 __assoc(intel_crtc_state, p),		\