[PATCH 1/6] drm/msm/mdp: Use atomic helper to set crtc property
Daniel Vetter
daniel at ffwll.ch
Mon Feb 15 13:42:26 UTC 2016
On Mon, Feb 15, 2016 at 06:30:54PM +0530, Archit Taneja wrote:
> Assign drm_atomic_helper_crtc_set_property helper to MDP4 and MDP5
> crtcs' set_property ops. This replaces the custom funcs that
> returned an error even for standard crtc properties.
>
> Signed-off-by: Archit Taneja <architt at codeaurora.org>
> ---
> drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 9 +--------
> drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 9 +--------
> 2 files changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
> index 28df397..4b95d6c 100644
> --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
> +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c
> @@ -361,13 +361,6 @@ static void mdp4_crtc_atomic_flush(struct drm_crtc *crtc,
> request_pending(crtc, PENDING_FLIP);
> }
>
> -static int mdp4_crtc_set_property(struct drm_crtc *crtc,
> - struct drm_property *property, uint64_t val)
> -{
> - // XXX
> - return -EINVAL;
Oops. Otoh you can't set atomic props by default through legacy funcs (or
at least they're not listed), so not to harmful.
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> -}
> -
> #define CURSOR_WIDTH 64
> #define CURSOR_HEIGHT 64
>
> @@ -499,7 +492,7 @@ static const struct drm_crtc_funcs mdp4_crtc_funcs = {
> .set_config = drm_atomic_helper_set_config,
> .destroy = mdp4_crtc_destroy,
> .page_flip = drm_atomic_helper_page_flip,
> - .set_property = mdp4_crtc_set_property,
> + .set_property = drm_atomic_helper_crtc_set_property,
> .cursor_set = mdp4_crtc_cursor_set,
> .cursor_move = mdp4_crtc_cursor_move,
> .reset = drm_atomic_helper_crtc_reset,
> diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
> index 20cee5c..9a15205 100644
> --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
> +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
> @@ -468,13 +468,6 @@ static void mdp5_crtc_atomic_flush(struct drm_crtc *crtc,
> request_pending(crtc, PENDING_FLIP);
> }
>
> -static int mdp5_crtc_set_property(struct drm_crtc *crtc,
> - struct drm_property *property, uint64_t val)
> -{
> - // XXX
> - return -EINVAL;
> -}
> -
> static void get_roi(struct drm_crtc *crtc, uint32_t *roi_w, uint32_t *roi_h)
> {
> struct mdp5_crtc *mdp5_crtc = to_mdp5_crtc(crtc);
> @@ -625,7 +618,7 @@ static const struct drm_crtc_funcs mdp5_crtc_funcs = {
> .set_config = drm_atomic_helper_set_config,
> .destroy = mdp5_crtc_destroy,
> .page_flip = drm_atomic_helper_page_flip,
> - .set_property = mdp5_crtc_set_property,
> + .set_property = drm_atomic_helper_crtc_set_property,
> .reset = drm_atomic_helper_crtc_reset,
> .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
> .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> hosted by The Linux Foundation
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list