linux/drivers/gpu/drm/msm/mdp/mdp5
Ville Syrjälä bcb0b46145 drm: Replace drm_format_num_planes() with fb->format->num_planes
Replace drm_format_num_planes(fb->pixel_format) with just
fb->format->num_planes. Avoids the expensive format info lookup.

@@
struct drm_framebuffer *a;
struct drm_framebuffer b;
@@
(
- drm_format_num_planes(a->pixel_format)
+ a->format->num_planes
|
- drm_format_num_planes(b.pixel_format)
+ b.format->num_planes
)

@@
struct drm_plane_state *a;
struct drm_plane_state b;
@@
(
- drm_format_num_planes(a->fb->pixel_format)
+ a->fb->format->num_planes
|
- drm_format_num_planes(b.fb->pixel_format)
+ b.fb->format->num_planes
)

@@
struct drm_framebuffer *a;
identifier T;
@@
  T = a->pixel_format
<+...
- drm_format_num_planes(T)
+ a->format->num_planes
...+>

@@
struct drm_framebuffer b;
identifier T;
@@
  T = b.pixel_format
<+...
- drm_format_num_planes(T)
+ b.format->num_planes
...+>

v2: Rerun spatch due to code changes

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1481751022-18015-1-git-send-email-ville.syrjala@linux.intel.com
2016-12-15 14:55:31 +02:00
..
mdp5_cfg.c drm/msm: support multiple address spaces 2016-11-27 11:23:09 -05:00
mdp5_cfg.h drm/msm/mdp5: Basic support for MDP5 v1.7 (MSM8996) 2015-10-22 15:39:57 -04:00
mdp5_cmd_encoder.c drm/msm/mdp5: Use updated MDP5 register names 2016-07-16 10:08:57 -04:00
mdp5_crtc.c drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
mdp5_ctl.c drm/msm/mdp5: Use updated MDP5 register names 2016-07-16 10:08:57 -04:00
mdp5_ctl.h drm/msm/mdp5: Allocate CTL0/1 for dual DSI single FLUSH 2015-08-15 18:27:16 -04:00
mdp5_encoder.c drm/msm/mdp5: Use updated MDP5 register names 2016-07-16 10:08:57 -04:00
mdp5_irq.c drm/msm/mdp5: dump smp state on errors too 2016-11-27 11:32:35 -05:00
mdp5_kms.c drm/msm/mdp5: move LM bounds check into plane->atomic_check() 2016-11-27 11:32:35 -05:00
mdp5_kms.h drm/msm/mdp5: handle SMP block allocations "atomically" 2016-11-27 11:32:34 -05:00
mdp5_mdss.c drm/msm: Call pm_runtime_enable/disable for newly created devices 2016-07-16 10:08:58 -04:00
mdp5_pipe.c drm/msm/mdp5: handle SMP block allocations "atomically" 2016-11-27 11:32:34 -05:00
mdp5_pipe.h drm/msm/mdp5: handle SMP block allocations "atomically" 2016-11-27 11:32:34 -05:00
mdp5_plane.c drm: Replace drm_format_num_planes() with fb->format->num_planes 2016-12-15 14:55:31 +02:00
mdp5_smp.c drm/msm/mdp5: dump smp state on errors too 2016-11-27 11:32:35 -05:00
mdp5_smp.h drm/msm/mdp5: add debugfs to show smp block status 2016-11-27 11:32:34 -05:00
mdp5.xml.h drm/msm: update generated headers 2016-11-28 15:14:10 -05:00