diff mbox series

[RFC,v2,04/13] drm/msm/dpu: remove unused fields from dpu_encoder_virt

Message ID 20230321011821.635977-5-dmitry.baryshkov@linaro.org (mailing list archive)
State New, archived
Headers show
Series drm/msm/dpu: support virtual wide planes | expand

Commit Message

Dmitry Baryshkov March 21, 2023, 1:18 a.m. UTC
Remove historical fields intfs_swapped and topology fields from struct
dpu_encoder_virt and also remove even more historical docs.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

Abhinav Kumar June 6, 2023, 8:25 p.m. UTC | #1
On 3/20/2023 6:18 PM, Dmitry Baryshkov wrote:
> Remove historical fields intfs_swapped and topology fields from struct
> dpu_encoder_virt and also remove even more historical docs.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 ----------
>   1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> index 28729c77364f..4ee708264f3b 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> @@ -130,18 +130,12 @@ enum dpu_enc_rc_states {
>    *			pingpong blocks can be different than num_phys_encs.
>    * @hw_dsc:		Handle to the DSC blocks used for the display.
>    * @dsc_mask:		Bitmask of used DSC blocks.
> - * @intfs_swapped:	Whether or not the phys_enc interfaces have been swapped
> - *			for partial update right-only cases, such as pingpong
> - *			split where virtual pingpong does not generate IRQs
>    * @crtc:		Pointer to the currently assigned crtc. Normally you
>    *			would use crtc->state->encoder_mask to determine the
>    *			link between encoder/crtc. However in this case we need
>    *			to track crtc in the disable() hook which is called
>    *			_after_ encoder_mask is cleared.
>    * @connector:		If a mode is set, cached pointer to the active connector
> - * @crtc_kickoff_cb:		Callback into CRTC that will flush & start
> - *				all CTL paths
> - * @crtc_kickoff_cb_data:	Opaque user data given to crtc_kickoff_cb

no concerns with the above 3

>    * @enc_lock:			Lock around physical encoder
>    *				create/destroy/enable/disable
>    * @frame_busy_mask:		Bitmask tracking which phys_enc we are still
> @@ -160,7 +154,6 @@ enum dpu_enc_rc_states {
>    * @delayed_off_work:		delayed worker to schedule disabling of
>    *				clks and resources after IDLE_TIMEOUT time.
>    * @vsync_event_work:		worker to handle vsync event for autorefresh
> - * @topology:                   topology of the display

As we are still going to go ahead with encoder based allocation for now, 
we should keep this topology and start using it for DP DSC's 1:1:1 topology.

>    * @idle_timeout:		idle timeout duration in milliseconds
>    * @wide_bus_en:		wide bus is enabled on this interface
>    * @dsc:			drm_dsc_config pointer, for DSC-enabled encoders
> @@ -180,8 +173,6 @@ struct dpu_encoder_virt {
>   
>   	unsigned int dsc_mask;
>   
> -	bool intfs_swapped;
> -
>   	struct drm_crtc *crtc;
>   	struct drm_connector *connector;
>   
> @@ -201,7 +192,6 @@ struct dpu_encoder_virt {
>   	enum dpu_enc_rc_states rc_state;
>   	struct delayed_work delayed_off_work;
>   	struct kthread_work vsync_event_work;
> -	struct msm_display_topology topology;
>   
>   	u32 idle_timeout;
>
Dmitry Baryshkov June 6, 2023, 8:29 p.m. UTC | #2
On 06/06/2023 23:25, Abhinav Kumar wrote:
> 
> 
> On 3/20/2023 6:18 PM, Dmitry Baryshkov wrote:
>> Remove historical fields intfs_swapped and topology fields from struct
>> dpu_encoder_virt and also remove even more historical docs.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 ----------
>>   1 file changed, 10 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c 
>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> index 28729c77364f..4ee708264f3b 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>> @@ -130,18 +130,12 @@ enum dpu_enc_rc_states {
>>    *            pingpong blocks can be different than num_phys_encs.
>>    * @hw_dsc:        Handle to the DSC blocks used for the display.
>>    * @dsc_mask:        Bitmask of used DSC blocks.
>> - * @intfs_swapped:    Whether or not the phys_enc interfaces have 
>> been swapped
>> - *            for partial update right-only cases, such as pingpong
>> - *            split where virtual pingpong does not generate IRQs
>>    * @crtc:        Pointer to the currently assigned crtc. Normally you
>>    *            would use crtc->state->encoder_mask to determine the
>>    *            link between encoder/crtc. However in this case we need
>>    *            to track crtc in the disable() hook which is called
>>    *            _after_ encoder_mask is cleared.
>>    * @connector:        If a mode is set, cached pointer to the active 
>> connector
>> - * @crtc_kickoff_cb:        Callback into CRTC that will flush & start
>> - *                all CTL paths
>> - * @crtc_kickoff_cb_data:    Opaque user data given to crtc_kickoff_cb
> 
> no concerns with the above 3
> 
>>    * @enc_lock:            Lock around physical encoder
>>    *                create/destroy/enable/disable
>>    * @frame_busy_mask:        Bitmask tracking which phys_enc we are 
>> still
>> @@ -160,7 +154,6 @@ enum dpu_enc_rc_states {
>>    * @delayed_off_work:        delayed worker to schedule disabling of
>>    *                clks and resources after IDLE_TIMEOUT time.
>>    * @vsync_event_work:        worker to handle vsync event for 
>> autorefresh
>> - * @topology:                   topology of the display
> 
> As we are still going to go ahead with encoder based allocation for now, 
> we should keep this topology and start using it for DP DSC's 1:1:1 
> topology.

It is currently unused, so it can be dropped. Your patchset would have 
to reintroduce it.

And I'm still not happy about the encoder-based allocation. You 
persuaded me that it is irrelevant for the wide planes. So I'd split it 
and post the allocation patchset after the virtual-wide is fully 
reviewed (when would come that blissful moment, btw?).

> 
>>    * @idle_timeout:        idle timeout duration in milliseconds
>>    * @wide_bus_en:        wide bus is enabled on this interface
>>    * @dsc:            drm_dsc_config pointer, for DSC-enabled encoders
>> @@ -180,8 +173,6 @@ struct dpu_encoder_virt {
>>       unsigned int dsc_mask;
>> -    bool intfs_swapped;
>> -
>>       struct drm_crtc *crtc;
>>       struct drm_connector *connector;
>> @@ -201,7 +192,6 @@ struct dpu_encoder_virt {
>>       enum dpu_enc_rc_states rc_state;
>>       struct delayed_work delayed_off_work;
>>       struct kthread_work vsync_event_work;
>> -    struct msm_display_topology topology;
>>       u32 idle_timeout;
Abhinav Kumar June 6, 2023, 8:36 p.m. UTC | #3
On 6/6/2023 1:29 PM, Dmitry Baryshkov wrote:
> On 06/06/2023 23:25, Abhinav Kumar wrote:
>>
>>
>> On 3/20/2023 6:18 PM, Dmitry Baryshkov wrote:
>>> Remove historical fields intfs_swapped and topology fields from struct
>>> dpu_encoder_virt and also remove even more historical docs.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>>>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 ----------
>>>   1 file changed, 10 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c 
>>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>>> index 28729c77364f..4ee708264f3b 100644
>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
>>> @@ -130,18 +130,12 @@ enum dpu_enc_rc_states {
>>>    *            pingpong blocks can be different than num_phys_encs.
>>>    * @hw_dsc:        Handle to the DSC blocks used for the display.
>>>    * @dsc_mask:        Bitmask of used DSC blocks.
>>> - * @intfs_swapped:    Whether or not the phys_enc interfaces have 
>>> been swapped
>>> - *            for partial update right-only cases, such as pingpong
>>> - *            split where virtual pingpong does not generate IRQs
>>>    * @crtc:        Pointer to the currently assigned crtc. Normally you
>>>    *            would use crtc->state->encoder_mask to determine the
>>>    *            link between encoder/crtc. However in this case we need
>>>    *            to track crtc in the disable() hook which is called
>>>    *            _after_ encoder_mask is cleared.
>>>    * @connector:        If a mode is set, cached pointer to the 
>>> active connector
>>> - * @crtc_kickoff_cb:        Callback into CRTC that will flush & start
>>> - *                all CTL paths
>>> - * @crtc_kickoff_cb_data:    Opaque user data given to crtc_kickoff_cb
>>
>> no concerns with the above 3
>>
>>>    * @enc_lock:            Lock around physical encoder
>>>    *                create/destroy/enable/disable
>>>    * @frame_busy_mask:        Bitmask tracking which phys_enc we are 
>>> still
>>> @@ -160,7 +154,6 @@ enum dpu_enc_rc_states {
>>>    * @delayed_off_work:        delayed worker to schedule disabling of
>>>    *                clks and resources after IDLE_TIMEOUT time.
>>>    * @vsync_event_work:        worker to handle vsync event for 
>>> autorefresh
>>> - * @topology:                   topology of the display
>>
>> As we are still going to go ahead with encoder based allocation for 
>> now, we should keep this topology and start using it for DP DSC's 
>> 1:1:1 topology.
> 
> It is currently unused, so it can be dropped. Your patchset would have 
> to reintroduce it.
> 

Ok same old argument which I tend to always lose. We will add it back 
with DP DSC.

> And I'm still not happy about the encoder-based allocation. You 
> persuaded me that it is irrelevant for the wide planes. So I'd split it 
> and post the allocation patchset after the virtual-wide is fully 
> reviewed (when would come that blissful moment, btw?).
> 

Post the allocation with a compelling feature for us to be convinced.

The moment is happening as we speak :)

>>
>>>    * @idle_timeout:        idle timeout duration in milliseconds
>>>    * @wide_bus_en:        wide bus is enabled on this interface
>>>    * @dsc:            drm_dsc_config pointer, for DSC-enabled encoders
>>> @@ -180,8 +173,6 @@ struct dpu_encoder_virt {
>>>       unsigned int dsc_mask;
>>> -    bool intfs_swapped;
>>> -
>>>       struct drm_crtc *crtc;
>>>       struct drm_connector *connector;
>>> @@ -201,7 +192,6 @@ struct dpu_encoder_virt {
>>>       enum dpu_enc_rc_states rc_state;
>>>       struct delayed_work delayed_off_work;
>>>       struct kthread_work vsync_event_work;
>>> -    struct msm_display_topology topology;
>>>       u32 idle_timeout;
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 28729c77364f..4ee708264f3b 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -130,18 +130,12 @@  enum dpu_enc_rc_states {
  *			pingpong blocks can be different than num_phys_encs.
  * @hw_dsc:		Handle to the DSC blocks used for the display.
  * @dsc_mask:		Bitmask of used DSC blocks.
- * @intfs_swapped:	Whether or not the phys_enc interfaces have been swapped
- *			for partial update right-only cases, such as pingpong
- *			split where virtual pingpong does not generate IRQs
  * @crtc:		Pointer to the currently assigned crtc. Normally you
  *			would use crtc->state->encoder_mask to determine the
  *			link between encoder/crtc. However in this case we need
  *			to track crtc in the disable() hook which is called
  *			_after_ encoder_mask is cleared.
  * @connector:		If a mode is set, cached pointer to the active connector
- * @crtc_kickoff_cb:		Callback into CRTC that will flush & start
- *				all CTL paths
- * @crtc_kickoff_cb_data:	Opaque user data given to crtc_kickoff_cb
  * @enc_lock:			Lock around physical encoder
  *				create/destroy/enable/disable
  * @frame_busy_mask:		Bitmask tracking which phys_enc we are still
@@ -160,7 +154,6 @@  enum dpu_enc_rc_states {
  * @delayed_off_work:		delayed worker to schedule disabling of
  *				clks and resources after IDLE_TIMEOUT time.
  * @vsync_event_work:		worker to handle vsync event for autorefresh
- * @topology:                   topology of the display
  * @idle_timeout:		idle timeout duration in milliseconds
  * @wide_bus_en:		wide bus is enabled on this interface
  * @dsc:			drm_dsc_config pointer, for DSC-enabled encoders
@@ -180,8 +173,6 @@  struct dpu_encoder_virt {
 
 	unsigned int dsc_mask;
 
-	bool intfs_swapped;
-
 	struct drm_crtc *crtc;
 	struct drm_connector *connector;
 
@@ -201,7 +192,6 @@  struct dpu_encoder_virt {
 	enum dpu_enc_rc_states rc_state;
 	struct delayed_work delayed_off_work;
 	struct kthread_work vsync_event_work;
-	struct msm_display_topology topology;
 
 	u32 idle_timeout;