Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357022
b: refs/heads/master
c: aecede4
h: refs/heads/master
v: v3
  • Loading branch information
Shaik Ameer Basha authored and Mauro Carvalho Chehab committed Dec 21, 2012
1 parent 7b4a44f commit 224ab03
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4bb891ebf60eb43ebd04e09bbcad24013067873f
refs/heads/master: aecede4c45ae32944e822ef98d4837733837887d
9 changes: 9 additions & 0 deletions trunk/drivers/media/platform/exynos-gsc/gsc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,15 @@ static const struct gsc_fmt gsc_formats[] = {
.corder = GSC_CRCB,
.num_planes = 3,
.num_comp = 3,
}, {
.name = "YUV 4:2:0 n.c. 2p, Y/CbCr tiled",
.pixelformat = V4L2_PIX_FMT_NV12MT_16X16,
.depth = { 8, 4 },
.color = GSC_YUV420,
.yorder = GSC_LSB_Y,
.corder = GSC_CBCR,
.num_planes = 2,
.num_comp = 2,
}
};

Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/media/platform/exynos-gsc/gsc-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ static inline void gsc_ctx_state_lock_clear(u32 state, struct gsc_ctx *ctx)
spin_unlock_irqrestore(&ctx->gsc_dev->slock, flags);
}

static inline int is_tiled(const struct gsc_fmt *fmt)
{
return fmt->pixelformat == V4L2_PIX_FMT_NV12MT_16X16;
}

static inline void gsc_hw_enable_control(struct gsc_dev *dev, bool on)
{
u32 cfg = readl(dev->regs + GSC_ENABLE);
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/media/platform/exynos-gsc/gsc-regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ void gsc_hw_set_in_image_format(struct gsc_ctx *ctx)
break;
}

if (is_tiled(frame->fmt))
cfg |= GSC_IN_TILE_C_16x8 | GSC_IN_TILE_MODE;

writel(cfg, dev->regs + GSC_IN_CON);
}

Expand Down Expand Up @@ -334,6 +337,9 @@ void gsc_hw_set_out_image_format(struct gsc_ctx *ctx)
break;
}

if (is_tiled(frame->fmt))
cfg |= GSC_OUT_TILE_C_16x8 | GSC_OUT_TILE_MODE;

end_set:
writel(cfg, dev->regs + GSC_OUT_CON);
}
Expand Down

0 comments on commit 224ab03

Please sign in to comment.