Commit 894752bb authored by Thierry Reding's avatar Thierry Reding

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: default avatarThierry Reding <thierry.reding@avionic-design.de>
parent 8cf1e981
...@@ -158,7 +158,7 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc, ...@@ -158,7 +158,7 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc,
struct drm_display_mode *adjusted, struct drm_display_mode *adjusted,
int x, int y, struct drm_framebuffer *old_fb) int x, int y, struct drm_framebuffer *old_fb)
{ {
struct tegra_framebuffer *fb = to_tegra_fb(crtc->fb); struct drm_gem_cma_object *gem = drm_fb_cma_get_gem_obj(crtc->fb, 0);
struct tegra_dc *dc = to_tegra_dc(crtc); struct tegra_dc *dc = to_tegra_dc(crtc);
unsigned int h_dda, v_dda, bpp; unsigned int h_dda, v_dda, bpp;
struct tegra_dc_window win; struct tegra_dc_window win;
......
...@@ -18,16 +18,6 @@ ...@@ -18,16 +18,6 @@
#include <drm/drm_fb_cma_helper.h> #include <drm/drm_fb_cma_helper.h>
#include <drm/drm_fixed.h> #include <drm/drm_fixed.h>
struct tegra_framebuffer {
struct drm_framebuffer base;
struct drm_gem_cma_object *obj;
};
static inline struct tegra_framebuffer *to_tegra_fb(struct drm_framebuffer *fb)
{
return container_of(fb, struct tegra_framebuffer, base);
}
struct host1x { struct host1x {
struct drm_device *drm; struct drm_device *drm;
struct device *dev; struct device *dev;
...@@ -44,7 +34,6 @@ struct host1x { ...@@ -44,7 +34,6 @@ struct host1x {
struct list_head clients; struct list_head clients;
struct drm_fbdev_cma *fbdev; struct drm_fbdev_cma *fbdev;
struct tegra_framebuffer fb;
}; };
struct host1x_client; struct host1x_client;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment