mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
video: tegra: add height/width to dc and fb
Change-Id: I22c280928079af04263375fce63a87776588a457 Signed-off-by: Erik Gilling <konkers@android.com>
This commit is contained in:
@@ -63,6 +63,9 @@ struct tegra_dc_out {
|
||||
unsigned align;
|
||||
unsigned depth;
|
||||
|
||||
unsigned height; /* mm */
|
||||
unsigned width; /* mm */
|
||||
|
||||
struct tegra_dc_mode *modes;
|
||||
int n_modes;
|
||||
|
||||
@@ -184,4 +187,7 @@ int tegra_dc_sync_windows(struct tegra_dc_win *windows[], int n);
|
||||
|
||||
int tegra_dc_set_mode(struct tegra_dc *dc, const struct tegra_dc_mode *mode);
|
||||
|
||||
unsigned tegra_dc_get_out_height(struct tegra_dc *dc);
|
||||
unsigned tegra_dc_get_out_width(struct tegra_dc *dc);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -822,6 +822,23 @@ static void tegra_dc_set_out(struct tegra_dc *dc, struct tegra_dc_out *out)
|
||||
|
||||
}
|
||||
|
||||
unsigned tegra_dc_get_out_height(struct tegra_dc *dc)
|
||||
{
|
||||
if (dc->out)
|
||||
return dc->out->height;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(tegra_dc_get_out_height);
|
||||
|
||||
unsigned tegra_dc_get_out_width(struct tegra_dc *dc)
|
||||
{
|
||||
if (dc->out)
|
||||
return dc->out->width;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(tegra_dc_get_out_width);
|
||||
|
||||
static irqreturn_t tegra_dc_irq(int irq, void *ptr)
|
||||
{
|
||||
|
||||
@@ -745,9 +745,8 @@ struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev,
|
||||
info->var.yres_virtual = fb_data->yres * 2;
|
||||
info->var.bits_per_pixel = fb_data->bits_per_pixel;
|
||||
info->var.activate = FB_ACTIVATE_VBL;
|
||||
/* TODO: fill in the following by querying the DC */
|
||||
info->var.height = -1;
|
||||
info->var.width = -1;
|
||||
info->var.height = tegra_dc_get_out_height(dc);
|
||||
info->var.width = tegra_dc_get_out_width(dc);
|
||||
info->var.pixclock = 0;
|
||||
info->var.left_margin = 0;
|
||||
info->var.right_margin = 0;
|
||||
|
||||
Reference in New Issue
Block a user