Skip to content

Commit

Permalink
drm/omap: Remove cpu_is_omapXXXX usage in DMM
Browse files Browse the repository at this point in the history
Removed usage of the cpu_is_omapXXXX in the DMM driver.  This is no
longer necessary as we can key off of the omap_dmm pointer that is
only non-NULL if the device has been probed successfully.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Andy Gross authored and Greg Kroah-Hartman committed Oct 22, 2012
1 parent 41c66e0 commit e5e4e9b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/omapdrm/omap_dmm_tiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ size_t tiler_vsize(enum tiler_fmt fmt, uint16_t w, uint16_t h)
return round_up(geom[fmt].cpp * w, PAGE_SIZE) * h;
}

bool dmm_is_initialized(void)
bool dmm_is_available(void)
{
return omap_dmm ? true : false;
}
Expand Down
7 changes: 1 addition & 6 deletions drivers/staging/omapdrm/omap_dmm_tiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ uint32_t tiler_stride(enum tiler_fmt fmt, uint32_t orient);
size_t tiler_size(enum tiler_fmt fmt, uint16_t w, uint16_t h);
size_t tiler_vsize(enum tiler_fmt fmt, uint16_t w, uint16_t h);
void tiler_align(enum tiler_fmt fmt, uint16_t *w, uint16_t *h);
bool dmm_is_initialized(void);
bool dmm_is_available(void);

extern struct platform_driver omap_dmm_driver;

Expand Down Expand Up @@ -139,9 +139,4 @@ static inline bool validfmt(enum tiler_fmt fmt)
}
}

static inline int dmm_is_available(void)
{
return cpu_is_omap44xx();
}

#endif
2 changes: 1 addition & 1 deletion drivers/staging/omapdrm/omap_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ void omap_gem_init(struct drm_device *dev)
};
int i, j;

if (!dmm_is_initialized()) {
if (!dmm_is_available()) {
/* DMM only supported on OMAP4 and later, so this isn't fatal */
dev_warn(dev->dev, "DMM not available, disable DMM support\n");
return;
Expand Down

0 comments on commit e5e4e9b

Please sign in to comment.