|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 5/9] drm/pl111: replace struct drm_simple_display_pipe with regular atomic helpers
On Wed Jul 8, 2026 at 9:03 PM CST, Thomas Zimmermann wrote:
>
>
> Am 04.07.26 um 20:31 schrieb Ze Huang:
>> Replace PL111 simple display pipe with explicit plane, CRTC and encoder
>> objects.
>>
>> Keep existing hardware programming and vblank behavior, and install GEM
>> framebuffer prepare helper explicitly.
>>
>> Signed-off-by: Ze Huang <ze.huang@xxxxxxxxxxxxxxxx>
>> ---
>> drivers/gpu/drm/pl111/pl111_display.c | 174
>> ++++++++++++++++++++++++++--------
>> drivers/gpu/drm/pl111/pl111_drm.h | 5 +-
>> drivers/gpu/drm/pl111/pl111_drv.c | 3 +-
>> 3 files changed, 136 insertions(+), 46 deletions(-)
>>
[ ... ]
>> -static int pl111_display_check(struct drm_simple_display_pipe *pipe,
>> - struct drm_plane_state *pstate,
>> - struct drm_crtc_state *cstate)
>> +static int pl111_plane_helper_atomic_check(struct drm_plane *plane,
>> + struct drm_atomic_commit *state)
>> {
>> - const struct drm_display_mode *mode = &cstate->mode;
>> - struct drm_framebuffer *old_fb = pipe->plane.state->fb;
>> + struct drm_plane_state *pstate = drm_atomic_get_new_plane_state(state,
>> plane);
>> + struct drm_crtc *crtc = pstate->crtc;
>> + struct drm_crtc_state *cstate;
>> + const struct drm_display_mode *mode;
>> + struct drm_framebuffer *old_fb = plane->state->fb;
>> struct drm_framebuffer *fb = pstate->fb;
>> + int ret;
>> +
>> + if (!crtc)
>> + return 0;
>> +
>> + cstate = drm_atomic_get_new_crtc_state(state, crtc);
>> + if (!cstate)
>> + return 0;
>> +
>> + ret = drm_atomic_helper_check_plane_state(pstate, cstate,
>> + DRM_PLANE_NO_SCALING,
>> + DRM_PLANE_NO_SCALING,
>> + false, false);
>
> This is another case of _check_plane_state() running conditionally.
>
Acknowledged
>> + if (ret)
>> + return ret;
>> +
>> + if (!pstate->visible)
>> + return 0;
>> +
>> + mode = &cstate->mode;
>>
>> if (mode->hdisplay % 16)
>> return -EINVAL;
>> @@ -117,16 +140,14 @@ static int pl111_display_check(struct
>> drm_simple_display_pipe *pipe,
>> return 0;
>> }
[ ... ]
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |