Re: [Freedreno] [PATCH 1/5] drm/atomic: add private obj state to state dump

2023-10-05 Thread Rob Clark
On Thu, Sep 7, 2023 at 8:05 PM Dmitry Baryshkov wrote: > > The drm_atomic_print_new_state() already prints private object state via > drm_atomic_private_obj_print_state(). Add private object state dumping > to __drm_state_dump(), so that it is also included into drm_state_dump() > output and into

Re: [Freedreno] [PATCH 2/2] drm/msm/dp: Remove error message when downstream port not connected

2023-10-05 Thread Dmitry Baryshkov
On 06/09/2023 21:12, Stephen Boyd wrote: Plugging in an Apple dongle without the HDMI cable attached prints out an error message in the kernel logs when nothing is actually wrong. no downstream ports connected This is because the downstream port for the HDMI connector is not connected, so

Re: [Freedreno] [PATCH 1/2] drm/msm/dp: Inline dp_display_is_sink_count_zero()

2023-10-05 Thread Dmitry Baryshkov
On 06/09/2023 21:12, Stephen Boyd wrote: This function is basically a one-liner when you ignore the debug logging. Just inline the function and drop the log to simplify the code. Suggested-by: Dmitry Baryshkov Cc: Vinod Polimera Cc: Kuogee Hsieh Signed-off-by: Stephen Boyd ---

[Freedreno] [PATCH v2] drm/msm/dpu: remove CRTC frame event callback registration

2023-10-05 Thread Dmitry Baryshkov
The frame event callback is always set to dpu_crtc_frame_event_cb() (or to NULL) and the data is always either the CRTC itself or NULL (correpondingly). Thus drop the event callback registration, call the dpu_crtc_frame_event_cb() directly and gate on the dpu_enc->crtc assigned using

[Freedreno] [PATCH v5 05/10] drm/msm/dpu: drop the `smart_dma_priority' field from struct dpu_sspp_sub_blks

2023-10-05 Thread Dmitry Baryshkov
In preparation to deduplicating SSPP subblocks, drop the (unused) `smart_dma_priority' field from struct dpu_sspp_sub_blks. If it is needed later (e.g. for SmartDMA v1), it should be added to the SSPP declarations themselves. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov ---

[Freedreno] [PATCH v5 09/10] drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4

2023-10-05 Thread Dmitry Baryshkov
Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4 are all related to different versions of the same HW scaling block. Corresponding driver parts use scaler_blk.version to identify the correct way to program the hardware. In order to simplify the driver codepath, merge these

[Freedreno] [PATCH v5 07/10] drm/msm/dpu: drop DPU_HW_SUBBLK_INFO macro

2023-10-05 Thread Dmitry Baryshkov
As the subblock info is now mostly gone, inline and drop the macro DPU_HW_SUBBLK_INFO. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h| 40 ++- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git

[Freedreno] [PATCH v5 10/10] drm/msm/gpu: drop duplicating VIG feature masks

2023-10-05 Thread Dmitry Baryshkov
After folding QSEED3LITE and QSEED4 feature bits into QSEED3 several VIG feature masks became equal. Drop these duplicates. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h| 2 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h| 8

[Freedreno] [PATCH v5 08/10] drm/msm/dpu: rewrite scaler and CSC presense checks

2023-10-05 Thread Dmitry Baryshkov
In order to check whether the SSPP block has scaler and CSC subblocks the funcion dpu_plane_atomic_check_pipe() uses macros which enumerate all possible scaler and CSC features. Replace those checks with the scaler and CSC subblock length checks in order to be able to drop those two macros.

[Freedreno] [PATCH v5 06/10] drm/msm/dpu: deduplicate some (most) of SSPP sub-blocks

2023-10-05 Thread Dmitry Baryshkov
As we have dropped the variadic parts of SSPP sub-blocks declarations, deduplicate them now, reducing memory cruft. Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 16 +-- .../msm/disp/dpu1/catalog/dpu_4_0_sdm845.h| 16 +--

[Freedreno] [PATCH v5 04/10] drm/msm/dpu: drop the `id' field from DPU_HW_SUBBLK_INFO

2023-10-05 Thread Dmitry Baryshkov
The field `id' is not used for subblocks. The handling code usually knows, which sub-block it is now looking at. Drop the field completely. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c| 76 +--

[Freedreno] [PATCH v5 03/10] drm/msm/dpu: Drop unused qseed_type from catalog dpu_caps

2023-10-05 Thread Dmitry Baryshkov
From: Marijn Suijten The SSPP scaler subblk is responsible for reporting its version (via the .id field, feature bits on the parent SSPP block, and since recently also from reading a register to supersede a read-but-unset version field in the catalog), leaving this global qseed_type field

[Freedreno] [PATCH v5 02/10] drm/msm/dpu: Drop unused get_scaler_ver callback from SSPP

2023-10-05 Thread Dmitry Baryshkov
From: Marijn Suijten This pointer callback is never used and should be removed. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov [DB: dropped the helpers completely, which are unused now] Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov ---

[Freedreno] [PATCH v5 01/10] drm/msm/dpu: populate SSPP scaler block version

2023-10-05 Thread Dmitry Baryshkov
The function _dpu_hw_sspp_setup_scaler3() passes and dpu_hw_setup_scaler3() uses scaler_blk.version to determine in which way the scaler (QSEED3) block should be programmed. However up to now we were not setting this field. Set it now, splitting the vig_sblk data which has different version

[Freedreno] [PATCH v5 00/10] drm/msm/dpu: simplify DPU sub-blocks info

2023-10-05 Thread Dmitry Baryshkov
The handling code also usually knows, which sub-block it is now looking at. Drop unused 'id' field and arguments and merge some of sub-block declarations. While we are at it, also fix all VIG subblocks to contain correct scaler block version and drop the becoming unused QSEED-related feature

[Freedreno] [PATCH] drm/atomic-helper: rename drm_atomic_helper_check_wb_encoder_state

2023-10-05 Thread Dmitry Baryshkov
The drm_atomic_helper_check_wb_encoder_state() function doesn't use encoder for anything other than getting the drm_device instance. The function's description talks about checking the writeback connector state, not the encoder state. Moreover, there is no such thing as an encoder state, encoders

Re: [Freedreno] [PATCH 0/9] drm: Annotate structs with __counted_by

2023-10-05 Thread Kees Cook
On Thu, Oct 05, 2023 at 11:42:38AM +0200, Christian König wrote: > Am 02.10.23 um 20:22 schrieb Kees Cook: > > On Mon, Oct 02, 2023 at 08:11:41PM +0200, Christian König wrote: > > > Am 02.10.23 um 20:08 schrieb Kees Cook: > > > > On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian König wrote: > >

Re: [Freedreno] [PATCH 0/9] drm: Annotate structs with __counted_by

2023-10-05 Thread Christian König
Am 02.10.23 um 20:22 schrieb Kees Cook: On Mon, Oct 02, 2023 at 08:11:41PM +0200, Christian König wrote: Am 02.10.23 um 20:08 schrieb Kees Cook: On Mon, Oct 02, 2023 at 08:01:57PM +0200, Christian König wrote: Am 02.10.23 um 18:53 schrieb Kees Cook: On Mon, Oct 02, 2023 at 11:06:19AM -0400,