diff options
| author | Ville Syrjälä <[email protected]> | 2016-12-14 21:30:57 +0000 |
|---|---|---|
| committer | Ville Syrjälä <[email protected]> | 2016-12-15 12:55:31 +0000 |
| commit | 353c859899635ea911f6476a0194c7a32c0c09c2 (patch) | |
| tree | 7cbc7c39a71dc766e603c97cb235dfe5b672a131 /drivers/gpu/drm/omapdrm/omap_fbdev.c | |
| parent | drm/i915: Eliminate the ugly 'fb?:' constructs from the ilk/skl wm code (diff) | |
| download | kernel-353c859899635ea911f6476a0194c7a32c0c09c2.tar.gz kernel-353c859899635ea911f6476a0194c7a32c0c09c2.zip | |
drm: Replace drm_format_plane_cpp() with fb->format->cpp[]
Replace drm_format_plane_cpp(fb->pixel_format) with just
fb->format->cpp[]. Avoids the expensive format info lookup.
@@
struct drm_framebuffer *a;
struct drm_framebuffer b;
expression E;
@@
(
- drm_format_plane_cpp(a->pixel_format, E)
+ a->format->cpp[E]
|
- drm_format_plane_cpp(b.pixel_format, E)
+ b.format->cpp[E]
)
@@
struct drm_plane_state *a;
struct drm_plane_state b;
expression E;
@@
(
- drm_format_plane_cpp(a->fb->pixel_format, E)
+ a->fb->format->cpp[E]
|
- drm_format_plane_cpp(b.fb->pixel_format, E)
+ b.fb->format->cpp[E]
)
@@
struct drm_framebuffer *a;
identifier T;
expression E;
@@
T = a->pixel_format
<+...
- drm_format_plane_cpp(T, E)
+ a->format->cpp[E]
...+>
@@
struct drm_framebuffer b;
identifier T;
expression E;
@@
T = b.pixel_format
<+...
- drm_format_plane_cpp(T, E)
+ b.format->cpp[E]
...+>
v2: Rerun spatch due to code changes
Cc: Laurent Pinchart <[email protected]>
Suggested-by: Laurent Pinchart <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_fbdev.c')
0 files changed, 0 insertions, 0 deletions
