aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-02-19 10:22:51 -0500
committerThierry Reding <thierry.reding@avionic-design.de>2013-02-22 02:21:10 -0500
commit894752bb576a26d3343cf8c674b73899f948da68 (patch)
tree050696a7025835fe0b897d87739cb9417116de19 /drivers/gpu
parent8cf1e9811471f2910fa38dc1b28e1789080ba961 (diff)
drm/tegra: Remove bogus tegra_framebuffer structure
Tegra uses the CMA FB helpers so framebuffers passed to the driver need to use the corresponding functions to access the underlying GEM objects. This used to work because struct tegra_framebuffer was sufficiently similar to struct drm_fb_cma but that isn't guaranteed to stay that way. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/tegra/dc.c2
-rw-r--r--drivers/gpu/drm/tegra/drm.h11
2 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 656b2e3334a6..d35ff8be7ae8 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -158,7 +158,7 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc,
158 struct drm_display_mode *adjusted, 158 struct drm_display_mode *adjusted,
159 int x, int y, struct drm_framebuffer *old_fb) 159 int x, int y, struct drm_framebuffer *old_fb)
160{ 160{
161 struct tegra_framebuffer *fb = to_tegra_fb(crtc->fb); 161 struct drm_gem_cma_object *gem = drm_fb_cma_get_gem_obj(crtc->fb, 0);
162 struct tegra_dc *dc = to_tegra_dc(crtc); 162 struct tegra_dc *dc = to_tegra_dc(crtc);
163 unsigned int h_dda, v_dda, bpp; 163 unsigned int h_dda, v_dda, bpp;
164 struct tegra_dc_window win; 164 struct tegra_dc_window win;
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
index 741b5dc2742c..3c61aab5fcb7 100644
--- a/drivers/gpu/drm/tegra/drm.h
+++ b/drivers/gpu/drm/tegra/drm.h
@@ -18,16 +18,6 @@
18#include <drm/drm_fb_cma_helper.h> 18#include <drm/drm_fb_cma_helper.h>
19#include <drm/drm_fixed.h> 19#include <drm/drm_fixed.h>
20 20
21struct tegra_framebuffer {
22 struct drm_framebuffer base;
23 struct drm_gem_cma_object *obj;
24};
25
26static inline struct tegra_framebuffer *to_tegra_fb(struct drm_framebuffer *fb)
27{
28 return container_of(fb, struct tegra_framebuffer, base);
29}
30
31struct host1x { 21struct host1x {
32 struct drm_device *drm; 22 struct drm_device *drm;
33 struct device *dev; 23 struct device *dev;
@@ -44,7 +34,6 @@ struct host1x {
44 struct list_head clients; 34 struct list_head clients;
45 35
46 struct drm_fbdev_cma *fbdev; 36 struct drm_fbdev_cma *fbdev;
47 struct tegra_framebuffer fb;
48}; 37};
49 38
50struct host1x_client; 39struct host1x_client;