Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: Don't implement empty prepare_fb()/cleanup_fb()

The plane .prepare_fb() and .cleanup_fb() helpers are optional, there's
no need to implement empty stubs, and no need to explicitly set the
function pointers to NULL either.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[danvet: Resolved conflicts with Chris' patch.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

authored by

Laurent Pinchart and committed by
Daniel Vetter
420382ad 7ad61e6b

-51
-2
drivers/gpu/drm/arc/arcpgu_crtc.c
··· 183 183 } 184 184 185 185 static const struct drm_plane_helper_funcs arc_pgu_plane_helper_funcs = { 186 - .prepare_fb = NULL, 187 - .cleanup_fb = NULL, 188 186 .atomic_update = arc_pgu_plane_atomic_update, 189 187 }; 190 188
-15
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
··· 169 169 return; 170 170 } 171 171 172 - static void 173 - fsl_dcu_drm_plane_cleanup_fb(struct drm_plane *plane, 174 - struct drm_plane_state *new_state) 175 - { 176 - } 177 - 178 - static int 179 - fsl_dcu_drm_plane_prepare_fb(struct drm_plane *plane, 180 - struct drm_plane_state *new_state) 181 - { 182 - return 0; 183 - } 184 - 185 172 static const struct drm_plane_helper_funcs fsl_dcu_drm_plane_helper_funcs = { 186 173 .atomic_check = fsl_dcu_drm_plane_atomic_check, 187 174 .atomic_disable = fsl_dcu_drm_plane_atomic_disable, 188 175 .atomic_update = fsl_dcu_drm_plane_atomic_update, 189 - .cleanup_fb = fsl_dcu_drm_plane_cleanup_fb, 190 - .prepare_fb = fsl_dcu_drm_plane_prepare_fb, 191 176 }; 192 177 193 178 static void fsl_dcu_drm_plane_destroy(struct drm_plane *plane)
-15
drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
··· 817 817 ade_compositor_routing_disable(base, ch); 818 818 } 819 819 820 - static int ade_plane_prepare_fb(struct drm_plane *plane, 821 - struct drm_plane_state *new_state) 822 - { 823 - /* do nothing */ 824 - return 0; 825 - } 826 - 827 - static void ade_plane_cleanup_fb(struct drm_plane *plane, 828 - struct drm_plane_state *old_state) 829 - { 830 - /* do nothing */ 831 - } 832 - 833 820 static int ade_plane_atomic_check(struct drm_plane *plane, 834 821 struct drm_plane_state *state) 835 822 { ··· 884 897 } 885 898 886 899 static const struct drm_plane_helper_funcs ade_plane_helper_funcs = { 887 - .prepare_fb = ade_plane_prepare_fb, 888 - .cleanup_fb = ade_plane_cleanup_fb, 889 900 .atomic_check = ade_plane_atomic_check, 890 901 .atomic_update = ade_plane_atomic_update, 891 902 .atomic_disable = ade_plane_atomic_disable,
-17
drivers/gpu/drm/tegra/dc.c
··· 480 480 .atomic_destroy_state = tegra_plane_atomic_destroy_state, 481 481 }; 482 482 483 - static int tegra_plane_prepare_fb(struct drm_plane *plane, 484 - struct drm_plane_state *new_state) 485 - { 486 - return 0; 487 - } 488 - 489 - static void tegra_plane_cleanup_fb(struct drm_plane *plane, 490 - struct drm_plane_state *old_fb) 491 - { 492 - } 493 - 494 483 static int tegra_plane_state_add(struct tegra_plane *plane, 495 484 struct drm_plane_state *state) 496 485 { ··· 613 624 } 614 625 615 626 static const struct drm_plane_helper_funcs tegra_primary_plane_helper_funcs = { 616 - .prepare_fb = tegra_plane_prepare_fb, 617 - .cleanup_fb = tegra_plane_cleanup_fb, 618 627 .atomic_check = tegra_plane_atomic_check, 619 628 .atomic_update = tegra_plane_atomic_update, 620 629 .atomic_disable = tegra_plane_atomic_disable, ··· 783 796 }; 784 797 785 798 static const struct drm_plane_helper_funcs tegra_cursor_plane_helper_funcs = { 786 - .prepare_fb = tegra_plane_prepare_fb, 787 - .cleanup_fb = tegra_plane_cleanup_fb, 788 799 .atomic_check = tegra_cursor_atomic_check, 789 800 .atomic_update = tegra_cursor_atomic_update, 790 801 .atomic_disable = tegra_cursor_atomic_disable, ··· 851 866 }; 852 867 853 868 static const struct drm_plane_helper_funcs tegra_overlay_plane_helper_funcs = { 854 - .prepare_fb = tegra_plane_prepare_fb, 855 - .cleanup_fb = tegra_plane_cleanup_fb, 856 869 .atomic_check = tegra_plane_atomic_check, 857 870 .atomic_update = tegra_plane_atomic_update, 858 871 .atomic_disable = tegra_plane_atomic_disable,
-2
drivers/gpu/drm/vc4/vc4_plane.c
··· 735 735 } 736 736 737 737 static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = { 738 - .prepare_fb = NULL, 739 - .cleanup_fb = NULL, 740 738 .atomic_check = vc4_plane_atomic_check, 741 739 .atomic_update = vc4_plane_atomic_update, 742 740 };