diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-12-15 00:31:35 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-12-15 15:55:33 +0300 |
commit | b00c600e91531df00aaa551049382416c4db745d (patch) | |
tree | 5cccbc5f6ab85c4bdba95f169c6337e8f87cf332 /drivers/gpu/drm/gma500 | |
parent | 145fcb115052c31f9aa5bed0ae9f9c4dd51b49ae (diff) | |
download | linux-b00c600e91531df00aaa551049382416c4db745d.tar.xz |
drm: Nuke fb->depth
Replace uses of fb->depth with fb->format->depth. Less duplicate
information is a good thing.
@@
struct drm_framebuffer *fb;
expression E;
@@
drm_helper_mode_fill_fb_struct(...) {
...
- fb->depth = E;
...
}
@@
struct nouveau_framebuffer *fb;
@@
- fb->base.depth
+ fb->base.format->depth
@@
struct drm_framebuffer fb;
@@
- fb.depth
+ fb.format->depth
@@
struct drm_framebuffer *fb;
@@
- fb->depth
+ fb->format->depth
@@
struct drm_framebuffer fb;
@@
- (fb.format->depth)
+ fb.format->depth
@@
struct drm_framebuffer *fb;
@@
- (fb->format->depth)
+ fb->format->depth
@@
@@
struct drm_framebuffer {
...
- unsigned int depth;
...
};
v2: Drop the vmw stuff (Daniel)
Rerun spatch due to code changes
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1481751095-18249-1-git-send-email-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r-- | drivers/gpu/drm/gma500/accel_2d.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/framebuffer.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/gma_display.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/mdfld_intel_display.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/oaktrail_crtc.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/gma500/accel_2d.c b/drivers/gpu/drm/gma500/accel_2d.c index 0d2bb1682508..c51d9259c7a7 100644 --- a/drivers/gpu/drm/gma500/accel_2d.c +++ b/drivers/gpu/drm/gma500/accel_2d.c @@ -254,7 +254,7 @@ static void psbfb_copyarea_accel(struct fb_info *info, offset = psbfb->gtt->offset; stride = fb->pitches[0]; - switch (fb->depth) { + switch (fb->format->depth) { case 8: src_format = PSB_2D_SRC_332RGB; dst_format = PSB_2D_DST_332RGB; diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index 6d89ed760941..a93b59ce6b41 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c @@ -407,7 +407,7 @@ static int psbfb_create(struct psb_fbdev *fbdev, fbdev->psb_fb_helper.fb = fb; - drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); + drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); strcpy(info->fix.id, "psbdrmfb"); info->flags = FBINFO_DEFAULT; diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c index 05b9a4ceb58d..5b852ad152ae 100644 --- a/drivers/gpu/drm/gma500/gma_display.c +++ b/drivers/gpu/drm/gma500/gma_display.c @@ -94,7 +94,7 @@ int gma_pipe_set_base(struct drm_crtc *crtc, int x, int y, dspcntr |= DISPPLANE_8BPP; break; case 16: - if (fb->depth == 15) + if (fb->format->depth == 15) dspcntr |= DISPPLANE_15_16BPP; else dspcntr |= DISPPLANE_16BPP; diff --git a/drivers/gpu/drm/gma500/mdfld_intel_display.c b/drivers/gpu/drm/gma500/mdfld_intel_display.c index e80895285e94..3be3111825cd 100644 --- a/drivers/gpu/drm/gma500/mdfld_intel_display.c +++ b/drivers/gpu/drm/gma500/mdfld_intel_display.c @@ -208,7 +208,7 @@ static int mdfld__intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, dspcntr |= DISPPLANE_8BPP; break; case 16: - if (fb->depth == 15) + if (fb->format->depth == 15) dspcntr |= DISPPLANE_15_16BPP; else dspcntr |= DISPPLANE_16BPP; diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c index a51896544d91..569810d47786 100644 --- a/drivers/gpu/drm/gma500/oaktrail_crtc.c +++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c @@ -630,7 +630,7 @@ static int oaktrail_pipe_set_base(struct drm_crtc *crtc, dspcntr |= DISPPLANE_8BPP; break; case 16: - if (fb->depth == 15) + if (fb->format->depth == 15) dspcntr |= DISPPLANE_15_16BPP; else dspcntr |= DISPPLANE_16BPP; |