lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230613070426.467389-9-manikandan.m@microchip.com>
Date:   Tue, 13 Jun 2023 12:34:25 +0530
From:   Manikandan Muralidharan <manikandan.m@...rochip.com>
To:     <lee@...nel.org>, <robh+dt@...nel.org>,
        <krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
        <nicolas.ferre@...rochip.com>, <alexandre.belloni@...tlin.com>,
        <claudiu.beznea@...rochip.com>, <sam@...nborg.org>,
        <bbrezillon@...nel.org>, <airlied@...il.com>, <daniel@...ll.ch>,
        <devicetree@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>
CC:     <Hari.PrasathGE@...rochip.com>,
        <Balamanikandan.Gunasundar@...rochip.com>,
        <Durai.ManickamKR@...rochip.com>, <Nayabbasha.Sayed@...rochip.com>,
        <Dharma.B@...rochip.com>, <Varshini.Rajendran@...rochip.com>,
        <Balakrishnan.S@...rochip.com>,
        Manikandan <manikandan.m@...rochip.com>
Subject: [PATCH 8/9] drm: atmel-hlcdc: add vertical and horizontal scaling support for XLCDC

update the LCDC_HEOCFG30 and LCDC_HEOCFG31 registers of XLCDC IP which
supports vertical and horizontal scaling with Bilinear and Bicubic
co-efficients taps for Chroma and Luma componenets of the Pixel.

Signed-off-by: Manikandan Muralidharan <manikandan.m@...rochip.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c   |  2 ++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h   |  4 ++++
 .../gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c    | 18 ++++++++++++++++++
 3 files changed, 24 insertions(+)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
index fbbd2592efc7..8fcaa4023155 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
@@ -536,6 +536,8 @@ static const struct atmel_hlcdc_layer_desc atmel_xlcdc_sam9x7_layers[] = {
 			.general_config = 12,
 			.csc = 16,
 			.scaler_config = 23,
+			.vxs_config = 30,
+			.hxs_config = 31,
 		},
 		.clut_offset = 0x1300,
 	},
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
index 804e4d476f2b..9aedfd0f6039 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
@@ -264,6 +264,8 @@
  * @disc_pos: discard area position register
  * @disc_size: discard area size register
  * @csc: color space conversion register
+ * @vxs_config: vertical scalar filter taps control register
+ * @hxs_config: horizontal scalar filter taps control register
  */
 struct atmel_hlcdc_layer_cfg_layout {
 	int xstride[ATMEL_HLCDC_LAYER_MAX_PLANES];
@@ -283,6 +285,8 @@ struct atmel_hlcdc_layer_cfg_layout {
 	int disc_pos;
 	int disc_size;
 	int csc;
+	int vxs_config;
+	int hxs_config;
 };
 
 /**
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
index fe33476818c4..613382baa553 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
@@ -961,6 +961,24 @@ static int atmel_hlcdc_plane_init_properties(struct atmel_hlcdc_plane *plane)
 						    desc->layout.csc + 6,
 						    0x00000007);
 		}
+		if (desc->layout.vxs_config && desc->layout.hxs_config) {
+			/*
+			 * Updating vxs.config and hxs.config fixes the
+			 * Green Color Issue in SAM9X7 EGT Video Player App
+			 */
+			atmel_hlcdc_layer_write_cfg(&plane->layer,
+						    desc->layout.vxs_config,
+						    ATMEL_XLCDC_LAYER_VXSYCFG_ONE |
+						    ATMEL_XLCDC_LAYER_VXSYTAP2_ENABLE |
+						    ATMEL_XLCDC_LAYER_VXSCCFG_ONE |
+						    ATMEL_XLCDC_LAYER_VXSCTAP2_ENABLE);
+			atmel_hlcdc_layer_write_cfg(&plane->layer,
+						    desc->layout.hxs_config,
+						    ATMEL_XLCDC_LAYER_HXSYCFG_ONE |
+						    ATMEL_XLCDC_LAYER_HXSYTAP2_ENABLE |
+						    ATMEL_XLCDC_LAYER_HXSCCFG_ONE |
+						    ATMEL_XLCDC_LAYER_HXSCTAP2_ENABLE);
+		}
 	}
 
 	return 0;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ