182-media-atmel-atmel-isc-regs-add-additional-fields-for.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From bf032d1a0105939b90072914d88181fbe6187f43 Mon Sep 17 00:00:00 2001
  2. From: Eugen Hristev <[email protected]>
  3. Date: Tue, 13 Apr 2021 12:57:24 +0200
  4. Subject: [PATCH 182/247] media: atmel: atmel-isc-regs: add additional fields
  5. for sama7g5 type pipeline
  6. Add additional fields for registers present in sama7g5 type pipeline.
  7. Extend register masks for additional bits in sama7g5 type pipeline registers.
  8. Signed-off-by: Eugen Hristev <[email protected]>
  9. Signed-off-by: Hans Verkuil <[email protected]>
  10. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  11. ---
  12. drivers/media/platform/atmel/atmel-isc-regs.h | 16 ++++++++++++++--
  13. 1 file changed, 14 insertions(+), 2 deletions(-)
  14. --- a/drivers/media/platform/atmel/atmel-isc-regs.h
  15. +++ b/drivers/media/platform/atmel/atmel-isc-regs.h
  16. @@ -289,8 +289,18 @@
  17. #define ISC_RLP_CFG_MODE_ARGB32 0xa
  18. #define ISC_RLP_CFG_MODE_YYCC 0xb
  19. #define ISC_RLP_CFG_MODE_YYCC_LIMITED 0xc
  20. +#define ISC_RLP_CFG_MODE_YCYC 0xd
  21. #define ISC_RLP_CFG_MODE_MASK GENMASK(3, 0)
  22. +#define ISC_RLP_CFG_LSH BIT(5)
  23. +
  24. +#define ISC_RLP_CFG_YMODE_YUYV (3 << 6)
  25. +#define ISC_RLP_CFG_YMODE_YVYU (2 << 6)
  26. +#define ISC_RLP_CFG_YMODE_VYUY (0 << 6)
  27. +#define ISC_RLP_CFG_YMODE_UYVY (1 << 6)
  28. +
  29. +#define ISC_RLP_CFG_YMODE_MASK GENMASK(7, 6)
  30. +
  31. /* Offset for HIS register specific to sama5d2 product */
  32. #define ISC_SAMA5D2_HIS_OFFSET 0
  33. /* Histogram Control Register */
  34. @@ -332,13 +342,15 @@
  35. #define ISC_DCFG_YMBSIZE_BEATS4 (0x1 << 4)
  36. #define ISC_DCFG_YMBSIZE_BEATS8 (0x2 << 4)
  37. #define ISC_DCFG_YMBSIZE_BEATS16 (0x3 << 4)
  38. -#define ISC_DCFG_YMBSIZE_MASK GENMASK(5, 4)
  39. +#define ISC_DCFG_YMBSIZE_BEATS32 (0x4 << 4)
  40. +#define ISC_DCFG_YMBSIZE_MASK GENMASK(6, 4)
  41. #define ISC_DCFG_CMBSIZE_SINGLE (0x0 << 8)
  42. #define ISC_DCFG_CMBSIZE_BEATS4 (0x1 << 8)
  43. #define ISC_DCFG_CMBSIZE_BEATS8 (0x2 << 8)
  44. #define ISC_DCFG_CMBSIZE_BEATS16 (0x3 << 8)
  45. -#define ISC_DCFG_CMBSIZE_MASK GENMASK(9, 8)
  46. +#define ISC_DCFG_CMBSIZE_BEATS32 (0x4 << 8)
  47. +#define ISC_DCFG_CMBSIZE_MASK GENMASK(10, 8)
  48. /* DMA Control Register */
  49. #define ISC_DCTRL 0x000003e4