2
0

178-media-atmel-atmel-isc-create-callback-for-GAM-submod.patch 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. From 96936a6753a13dea5a8f66de949e6594dd82ce22 Mon Sep 17 00:00:00 2001
  2. From: Eugen Hristev <[email protected]>
  3. Date: Tue, 13 Apr 2021 12:57:20 +0200
  4. Subject: [PATCH 178/247] media: atmel: atmel-isc: create callback for GAM
  5. submodule product specific
  6. The GAM submodule is a part of the atmel-isc pipeline, and stands for
  7. Gamma Correction. It is used to apply the gamma curve to the incoming pixels.
  8. Create a product specific callback for initializing the GAM submodule
  9. of the pipeline.
  10. For sama5d2 product, there is no special configuration at this moment,
  11. thus this function is a noop.
  12. [hverkuil: made isc_sama5d2_config_gam static]
  13. Signed-off-by: Eugen Hristev <[email protected]>
  14. Signed-off-by: Hans Verkuil <[email protected]>
  15. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  16. ---
  17. drivers/media/platform/atmel/atmel-isc-base.c | 1 +
  18. drivers/media/platform/atmel/atmel-isc.h | 3 +++
  19. drivers/media/platform/atmel/atmel-sama5d2-isc.c | 6 ++++++
  20. 3 files changed, 10 insertions(+)
  21. --- a/drivers/media/platform/atmel/atmel-isc-base.c
  22. +++ b/drivers/media/platform/atmel/atmel-isc-base.c
  23. @@ -663,6 +663,7 @@ static void isc_set_pipeline(struct isc_
  24. isc->config_csc(isc);
  25. isc->config_cbc(isc);
  26. isc->config_cc(isc);
  27. + isc->config_gam(isc);
  28. }
  29. static int isc_update_profile(struct isc_device *isc)
  30. --- a/drivers/media/platform/atmel/atmel-isc.h
  31. +++ b/drivers/media/platform/atmel/atmel-isc.h
  32. @@ -228,6 +228,8 @@ struct isc_reg_offsets {
  33. * specific CBC module
  34. * @config_cc: pointer to a function that initializes product
  35. * specific CC module
  36. + * @config_gam: pointer to a function that initializes product
  37. + * specific GAMMA module
  38. * @config_ctrls: pointer to a functoin that initializes product
  39. * specific v4l2 controls.
  40. *
  41. @@ -305,6 +307,7 @@ struct isc_device {
  42. void (*config_csc)(struct isc_device *isc);
  43. void (*config_cbc)(struct isc_device *isc);
  44. void (*config_cc)(struct isc_device *isc);
  45. + void (*config_gam)(struct isc_device *isc);
  46. void (*config_ctrls)(struct isc_device *isc,
  47. const struct v4l2_ctrl_ops *ops);
  48. --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c
  49. +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c
  50. @@ -112,6 +112,11 @@ static void isc_sama5d2_config_dpc(struc
  51. /* This module is not present on sama5d2 pipeline */
  52. }
  53. +static void isc_sama5d2_config_gam(struct isc_device *isc)
  54. +{
  55. + /* No specific gamma configuration */
  56. +}
  57. +
  58. /* Gamma table with gamma 1/2.2 */
  59. static const u32 isc_sama5d2_gamma_table[][GAMMA_ENTRIES] = {
  60. /* 0 --> gamma 1/1.8 */
  61. @@ -282,6 +287,7 @@ static int atmel_isc_probe(struct platfo
  62. isc->config_csc = isc_sama5d2_config_csc;
  63. isc->config_cbc = isc_sama5d2_config_cbc;
  64. isc->config_cc = isc_sama5d2_config_cc;
  65. + isc->config_gam = isc_sama5d2_config_gam;
  66. isc->config_ctrls = isc_sama5d2_config_ctrls;
  67. isc->offsets.csc = ISC_SAMA5D2_CSC_OFFSET;