mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
video: tegra: checkpatch changes
Signed-off-by: Erik Gilling <konkers@android.com>
This commit is contained in:
committed by
Colin Cross
parent
e1bc56e357
commit
f2b8046549
@@ -33,8 +33,8 @@ struct tegra_dc_blend {
|
||||
};
|
||||
|
||||
#define BLEND(key, control, weight0, weight1) \
|
||||
CKEY_ ## key | BLEND_CONTROL_ ## control | \
|
||||
BLEND_WEIGHT0(weight0) | BLEND_WEIGHT0(weight1)
|
||||
(CKEY_ ## key | BLEND_CONTROL_ ## control | \
|
||||
BLEND_WEIGHT0(weight0) | BLEND_WEIGHT0(weight1))
|
||||
|
||||
struct tegra_dc_mode {
|
||||
int pclk;
|
||||
|
||||
@@ -21,12 +21,17 @@
|
||||
#define __MACH_TEGRA_FB_H
|
||||
|
||||
#ifdef CONFIG_FB_TEGRA
|
||||
struct tegra_fb_info *tegra_fb_register(struct platform_device *pdev, struct tegra_dc *dc,
|
||||
struct tegra_fb_data *fb_data, struct resource *fb_mem);
|
||||
struct tegra_fb_info *tegra_fb_register(struct platform_device *pdev,
|
||||
struct tegra_dc *dc,
|
||||
struct tegra_fb_data *fb_data,
|
||||
struct resource *fb_mem);
|
||||
void tegra_fb_unregister(struct tegra_fb_info *fb_info);
|
||||
#else
|
||||
static inline struct tegra_fb_info *tegra_fb_register(struct platform_device *pdev, struct tegra_dc *dc,
|
||||
struct tegra_fb_data *fb_data, struct resource *fb_mem)
|
||||
static inline
|
||||
struct tegra_fb_info *tegra_fb_register(struct platform_device *pdev,
|
||||
struct tegra_dc *dc,
|
||||
struct tegra_fb_data *fb_data,
|
||||
struct resource *fb_mem)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ DEFINE_MUTEX(tegra_dc_lock);
|
||||
|
||||
static inline int tegra_dc_fmt_bpp(int fmt)
|
||||
{
|
||||
switch(fmt) {
|
||||
switch (fmt) {
|
||||
case TEGRA_WIN_FMT_P1:
|
||||
return 1;
|
||||
|
||||
@@ -229,7 +229,8 @@ static void _dump_regs(struct tegra_dc *dc, void *data,
|
||||
snprintf(buff, sizeof(buff), "WINDOW %c:\n", 'A' + i);
|
||||
print(data, buff);
|
||||
|
||||
tegra_dc_writel(dc, WINDOW_A_SELECT << i, DC_CMD_DISPLAY_WINDOW_HEADER);
|
||||
tegra_dc_writel(dc, WINDOW_A_SELECT << i,
|
||||
DC_CMD_DISPLAY_WINDOW_HEADER);
|
||||
DUMP_REG(DC_CMD_DISPLAY_WINDOW_HEADER);
|
||||
DUMP_REG(DC_WIN_WIN_OPTIONS);
|
||||
DUMP_REG(DC_WIN_BYTE_SWAP);
|
||||
@@ -311,7 +312,7 @@ static void tegra_dc_dbg_add(struct tegra_dc *dc)
|
||||
char name[32];
|
||||
|
||||
snprintf(name, sizeof(name), "tegra_dc%d_regs", dc->pdev->id);
|
||||
(void) debugfs_create_file(name, S_IRUGO,NULL, dc, &dbg_fops);
|
||||
(void) debugfs_create_file(name, S_IRUGO, NULL, dc, &dbg_fops);
|
||||
}
|
||||
#else
|
||||
static void tegra_dc_dbg_add(struct tegra_dc *dc) {}
|
||||
@@ -419,7 +420,8 @@ int tegra_dc_update_windows(struct tegra_dc_win *windows[], int n)
|
||||
val |= COLOR_EXPAND;
|
||||
tegra_dc_writel(dc, val, DC_WIN_WIN_OPTIONS);
|
||||
|
||||
tegra_dc_writel(dc, (unsigned long)win->phys_addr, DC_WINBUF_START_ADDR);
|
||||
tegra_dc_writel(dc, (unsigned long)win->phys_addr,
|
||||
DC_WINBUF_START_ADDR);
|
||||
tegra_dc_writel(dc, 0, DC_WINBUF_ADDR_H_OFFSET);
|
||||
tegra_dc_writel(dc, 0, DC_WINBUF_ADDR_V_OFFSET);
|
||||
|
||||
@@ -474,12 +476,14 @@ void tegra_dc_set_blending(struct tegra_dc *dc, struct tegra_dc_blend *blend)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < DC_N_WINDOWS; i++) {
|
||||
tegra_dc_writel(dc, WINDOW_A_SELECT << i, DC_CMD_DISPLAY_WINDOW_HEADER);
|
||||
tegra_dc_writel(dc, WINDOW_A_SELECT << i,
|
||||
DC_CMD_DISPLAY_WINDOW_HEADER);
|
||||
tegra_dc_writel(dc, blend[i].nokey, DC_WIN_BLEND_NOKEY);
|
||||
tegra_dc_writel(dc, blend[i].one_win, DC_WIN_BLEND_1WIN);
|
||||
tegra_dc_writel(dc, blend[i].two_win_x, DC_WIN_BLEND_2WIN_X);
|
||||
tegra_dc_writel(dc, blend[i].two_win_y, DC_WIN_BLEND_2WIN_Y);
|
||||
tegra_dc_writel(dc, blend[i].three_win_xy, DC_WIN_BLEND_3WIN_XY);
|
||||
tegra_dc_writel(dc, blend[i].three_win_xy,
|
||||
DC_WIN_BLEND_3WIN_XY);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(tegra_dc_set_blending);
|
||||
@@ -551,7 +555,8 @@ static void tegra_dc_set_out(struct tegra_dc *dc, struct tegra_dc_out *out)
|
||||
if (out->n_modes > 0)
|
||||
dc->mode = &dc->out->modes[0];
|
||||
else
|
||||
dev_err(&dc->pdev->dev, "No default modes specified. Leaving output disabled.\n");
|
||||
dev_err(&dc->pdev->dev,
|
||||
"No default modes specified. Leaving output disabled.\n");
|
||||
|
||||
switch (out->type) {
|
||||
case TEGRA_DC_OUT_RGB:
|
||||
@@ -754,7 +759,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
|
||||
if (fb_mem && dc->pdata->fb) {
|
||||
dc->fb = tegra_fb_register(pdev, dc, dc->pdata->fb, fb_mem);
|
||||
if (IS_ERR_OR_NULL(dc->fb))
|
||||
dc->fb = NULL;
|
||||
dc->fb = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
struct tegra_dc;
|
||||
|
||||
struct tegra_dc_out_ops {
|
||||
void (* init)(struct tegra_dc *dc);
|
||||
void (*init)(struct tegra_dc *dc);
|
||||
};
|
||||
|
||||
struct tegra_dc {
|
||||
@@ -64,7 +64,7 @@ static inline unsigned long tegra_dc_readl(struct tegra_dc *dc,
|
||||
}
|
||||
|
||||
static inline void tegra_dc_writel(struct tegra_dc *dc, unsigned long val,
|
||||
unsigned long reg)
|
||||
unsigned long reg)
|
||||
{
|
||||
writel(val, dc->base + reg * 4);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,8 @@ static int tegra_fb_release(struct fb_info *info, int user)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra_fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
static int tegra_fb_check_var(struct fb_var_screeninfo *var,
|
||||
struct fb_info *info)
|
||||
{
|
||||
if ((var->xres != info->var.xres) ||
|
||||
(var->yres != info->var.yres) ||
|
||||
@@ -135,7 +136,8 @@ static int tegra_fb_setcolreg(unsigned regno, unsigned red, unsigned green,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
static int tegra_fb_pan_display(struct fb_var_screeninfo *var,
|
||||
struct fb_info *info)
|
||||
{
|
||||
struct tegra_fb_info *tegra_fb = info->par;
|
||||
char __iomem *flush_start;
|
||||
@@ -144,7 +146,6 @@ static int tegra_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *i
|
||||
|
||||
flush_start = info->screen_base + (var->yoffset * info->fix.line_length);
|
||||
flush_end = flush_start + (var->yres * info->fix.line_length);
|
||||
/* do we need to dma flush here? */
|
||||
|
||||
info->var.xoffset = var->xoffset;
|
||||
info->var.yoffset = var->yoffset;
|
||||
@@ -161,24 +162,24 @@ static int tegra_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *i
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tegra_fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
|
||||
static void tegra_fb_fillrect(struct fb_info *info,
|
||||
const struct fb_fillrect *rect)
|
||||
{
|
||||
cfb_fillrect(info, rect);
|
||||
}
|
||||
|
||||
static void tegra_fb_copyarea(struct fb_info *info, const struct fb_copyarea *region)
|
||||
static void tegra_fb_copyarea(struct fb_info *info,
|
||||
const struct fb_copyarea *region)
|
||||
{
|
||||
cfb_copyarea(info, region);
|
||||
}
|
||||
|
||||
static void tegra_fb_imageblit(struct fb_info *info, const struct fb_image *image)
|
||||
static void tegra_fb_imageblit(struct fb_info *info,
|
||||
const struct fb_image *image)
|
||||
{
|
||||
cfb_imageblit(info, image);
|
||||
}
|
||||
|
||||
/* TODO: implement ALLOC, FREE, BLANK ioctls */
|
||||
/* TODO: implement private window ioctls to set overlay x,y */
|
||||
|
||||
static struct fb_ops tegra_fb_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.fb_open = tegra_fb_open,
|
||||
@@ -192,8 +193,10 @@ static struct fb_ops tegra_fb_ops = {
|
||||
.fb_imageblit = tegra_fb_imageblit,
|
||||
};
|
||||
|
||||
struct tegra_fb_info *tegra_fb_register(struct platform_device *pdev, struct tegra_dc *dc,
|
||||
struct tegra_fb_data *fb_data, struct resource *fb_mem)
|
||||
struct tegra_fb_info *tegra_fb_register(struct platform_device *pdev,
|
||||
struct tegra_dc *dc,
|
||||
struct tegra_fb_data *fb_data,
|
||||
struct resource *fb_mem)
|
||||
{
|
||||
struct tegra_dc_win *win;
|
||||
struct fb_info *info;
|
||||
@@ -205,7 +208,8 @@ struct tegra_fb_info *tegra_fb_register(struct platform_device *pdev, struct teg
|
||||
|
||||
win = tegra_dc_get_window(dc, fb_data->win);
|
||||
if (!win) {
|
||||
dev_err(&pdev->dev, "dc does not have a window at index %d\n", fb_data->win);
|
||||
dev_err(&pdev->dev, "dc does not have a window at index %d\n",
|
||||
fb_data->win);
|
||||
return ERR_PTR(-ENOENT);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user