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

drm: Drop crtc argument from __drm_atomic_helper_crtc_destroy_state

It's unused, and really this helper should only look at the state
structure and nothing else.

v2: Rebase on top of rockchip changes

v3: Drop unrelated hunk, spotted by Laurent.

v4: Rebase onto mtk driver merge.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Mark Yao <mark.yao@rock-chips.com>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1462804451-15318-1-git-send-email-daniel.vetter@ffwll.ch

+12 -15
+1 -1
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
··· 430 430 struct atmel_hlcdc_crtc_state *state; 431 431 432 432 state = drm_crtc_state_to_atmel_hlcdc_crtc_state(s); 433 - __drm_atomic_helper_crtc_destroy_state(crtc, s); 433 + __drm_atomic_helper_crtc_destroy_state(s); 434 434 kfree(state); 435 435 } 436 436
+3 -5
drivers/gpu/drm/drm_atomic_helper.c
··· 2530 2530 void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc) 2531 2531 { 2532 2532 if (crtc->state) 2533 - __drm_atomic_helper_crtc_destroy_state(crtc, crtc->state); 2533 + __drm_atomic_helper_crtc_destroy_state(crtc->state); 2534 2534 2535 2535 kfree(crtc->state); 2536 2536 crtc->state = kzalloc(sizeof(*crtc->state), GFP_KERNEL); ··· 2595 2595 2596 2596 /** 2597 2597 * __drm_atomic_helper_crtc_destroy_state - release CRTC state 2598 - * @crtc: CRTC object 2599 2598 * @state: CRTC state object to release 2600 2599 * 2601 2600 * Releases all resources stored in the CRTC state without actually freeing 2602 2601 * the memory of the CRTC state. This is useful for drivers that subclass the 2603 2602 * CRTC state. 2604 2603 */ 2605 - void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc, 2606 - struct drm_crtc_state *state) 2604 + void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state) 2607 2605 { 2608 2606 drm_property_unreference_blob(state->mode_blob); 2609 2607 drm_property_unreference_blob(state->degamma_lut); ··· 2621 2623 void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc, 2622 2624 struct drm_crtc_state *state) 2623 2625 { 2624 - __drm_atomic_helper_crtc_destroy_state(crtc, state); 2626 + __drm_atomic_helper_crtc_destroy_state(state); 2625 2627 kfree(state); 2626 2628 } 2627 2629 EXPORT_SYMBOL(drm_atomic_helper_crtc_destroy_state);
+2 -2
drivers/gpu/drm/i915/intel_display.c
··· 12924 12924 bool active; 12925 12925 12926 12926 old_state = old_crtc_state->state; 12927 - __drm_atomic_helper_crtc_destroy_state(crtc, old_crtc_state); 12927 + __drm_atomic_helper_crtc_destroy_state(old_crtc_state); 12928 12928 pipe_config = to_intel_crtc_state(old_crtc_state); 12929 12929 memset(pipe_config, 0, sizeof(*pipe_config)); 12930 12930 pipe_config->base.crtc = crtc; ··· 15760 15760 struct intel_crtc_state *crtc_state = crtc->config; 15761 15761 int pixclk = 0; 15762 15762 15763 - __drm_atomic_helper_crtc_destroy_state(&crtc->base, &crtc_state->base); 15763 + __drm_atomic_helper_crtc_destroy_state(&crtc_state->base); 15764 15764 memset(crtc_state, 0, sizeof(*crtc_state)); 15765 15765 crtc_state->base.crtc = &crtc->base; 15766 15766
+1 -1
drivers/gpu/drm/mediatek/mtk_drm_crtc.c
··· 146 146 static void mtk_drm_crtc_destroy_state(struct drm_crtc *crtc, 147 147 struct drm_crtc_state *state) 148 148 { 149 - __drm_atomic_helper_crtc_destroy_state(crtc, state); 149 + __drm_atomic_helper_crtc_destroy_state(state); 150 150 kfree(to_mtk_crtc_state(state)); 151 151 } 152 152
+1 -1
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
··· 1065 1065 { 1066 1066 struct rockchip_crtc_state *s = to_rockchip_crtc_state(state); 1067 1067 1068 - __drm_atomic_helper_crtc_destroy_state(crtc, &s->base); 1068 + __drm_atomic_helper_crtc_destroy_state(&s->base); 1069 1069 kfree(s); 1070 1070 } 1071 1071
+2 -2
drivers/gpu/drm/tegra/dc.c
··· 998 998 struct tegra_dc_state *state; 999 999 1000 1000 if (crtc->state) 1001 - __drm_atomic_helper_crtc_destroy_state(crtc, crtc->state); 1001 + __drm_atomic_helper_crtc_destroy_state(crtc->state); 1002 1002 1003 1003 kfree(crtc->state); 1004 1004 crtc->state = NULL; ··· 1034 1034 static void tegra_crtc_atomic_destroy_state(struct drm_crtc *crtc, 1035 1035 struct drm_crtc_state *state) 1036 1036 { 1037 - __drm_atomic_helper_crtc_destroy_state(crtc, state); 1037 + __drm_atomic_helper_crtc_destroy_state(state); 1038 1038 kfree(state); 1039 1039 } 1040 1040
+1 -1
drivers/gpu/drm/vc4/vc4_crtc.c
··· 650 650 651 651 } 652 652 653 - __drm_atomic_helper_crtc_destroy_state(crtc, state); 653 + __drm_atomic_helper_crtc_destroy_state(state); 654 654 } 655 655 656 656 static const struct drm_crtc_funcs vc4_crtc_funcs = {
+1 -2
include/drm/drm_atomic_helper.h
··· 119 119 struct drm_crtc_state *state); 120 120 struct drm_crtc_state * 121 121 drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc); 122 - void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc, 123 - struct drm_crtc_state *state); 122 + void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state); 124 123 void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc, 125 124 struct drm_crtc_state *state); 126 125