Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp209022lqd; Tue, 23 Apr 2024 22:37:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGJGiGXCUB7ThYTrx7MI2QDXIo0Omnxf/YnkSwXilCWHdpCtvSlofRlric0SJdRGGW9MjOLb6LAvW2nIhKg7JXHh1bqdNOIXVAiju9xw== X-Google-Smtp-Source: AGHT+IH7//c8A8+lSAsFCKOPAMh0XPEJTVyaGGlfAz2ds9Im3k0Y13pqGW4HWAgdfwDzMzKwecRY X-Received: by 2002:a05:6a20:8421:b0:1a8:2cd1:e4c6 with SMTP id c33-20020a056a20842100b001a82cd1e4c6mr1898497pzd.54.1713937036547; Tue, 23 Apr 2024 22:37:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713937036; cv=pass; d=google.com; s=arc-20160816; b=LVkkOKHtYxiYBs1b5rhVQvk81rCEYb9iRW8xF1swF2R4NYiPcplkV1ww232/IdW4vw Hj8w23Em5jt+Vb0cbvyT76CnshYdkm8NBxMtb3w737uRRghncgt1/2G2m7U7brT1fUMK /rfXu3x4IoR8scy8G0zY1TRhAZ+ObrjFKx9p7nXdnq4JgmTYS0aSNUl7Su1y9jXs9/Jh ByCzE7due7/J0XM5jOw1r8Vd8M8zkg1iDXv3PJ50iKJelVsw1dnO2/nOZI9CKxdd4bWT GYj+/U3Bfrh63sD5D2kOcc4Ia1Wr20Dg5kG4ZAFIsvJV7rZNiL502SZ1g2kob1Cmz3Rl yR4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=RM8dBreZVIjmi9aM58X5UfaKNJsy9GDJ83UtkbJxdjA=; fh=7zDsz27mBsgtoAIkbjOnm5GqQoRyvNqJW2tpYGq12lU=; b=aTzIsBUiS074LLWWp8StR85/vqRE6AL/sBL4wBCwy4cnv24HI0xJ+wggQsth4imXM9 69N2Ypn0lR2UX5o1hSn5nLly72YT50c0QfDGjGvQPWoa0Zw8Nb+eeIf5Po4j7HJHGjMk T3WvcsDS2Uf56IXI6IPiVhzTVUuVqIlJSPM3RH1cQUwDI7Xn2mgo0VGHCYuYXImVHr1G AyysabkyejF+hSTtSHLbzf/PgEtyVPk2lSLRCVT22ijBCLckw0H5ymeefKJlS8HCiWhY vIhI7oyWGM98/cI9lOnkppkiZ34s1P1Afjt4GxQXH5w7f4annIEh0gesfs5dYCedmazu /R+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=SHsj7XXs; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-156316-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156316-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e14-20020a170903240e00b001e797d47ee3si8375887plo.76.2024.04.23.22.37.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 22:37:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156316-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=SHsj7XXs; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-156316-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156316-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 53F0EB2368B for ; Wed, 24 Apr 2024 05:36:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FD37156896; Wed, 24 Apr 2024 05:35:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="SHsj7XXs" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22038156671 for ; Wed, 24 Apr 2024 05:35:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713936936; cv=none; b=knN6nXfFQERxtdQCVefHrwyLHLQyhVixTXOILMsTvZWRj+5ksQPCUIk8fWtZ0hcznlUzng4U2yb7WJggzscmTqJBLxoXNTkJbCflkvzt6IzGDeGn9iWn3WzA0z3fXMA76QnPnM5fniXyfoLUyZP7fGozlJKFiSmSq1ydH3l+ITI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713936936; c=relaxed/simple; bh=MFjWpwk59bsDChbs9KtKrNdxez95WJ176JCMOJ6L8fo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YDE3KrZX9BoLb0ewP7wZbhy5AuPUTRuM5UIkkEirc+NxrY4UJ7Co43PAyg+T7bmX4DpVmNGadah1xu3QmRHoLDnNqJjgMoj7kMQnA7Ueo+35Y0mLjTTabrJBrRKGEK2vmJIdq856AZdwHkyZXFks2YaXSM9WIQpYo5Mmj4wDeB8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=SHsj7XXs; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1713936935; x=1745472935; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MFjWpwk59bsDChbs9KtKrNdxez95WJ176JCMOJ6L8fo=; b=SHsj7XXs1VhCuGH7Xphm8Y5tB+BCUKyXoeJNArUJ2ixIE5fhDItC3Qma HV4QThktxYNFtuzNmuL3zZvRxNJGcUy85nlVfEOKJUKs4EdP62fZno3F+ KhB25mbMtXCQSNoNDtDGaaZtedO4YDY5B+MSrjGvV0k6TDeStVRyjGm0m vkJwSMhS+Pw+6l+bfEpM3kHwt1h3aroL3lrvigfAMl2aR6ycSrPX71dor v7j0I21hhuCC5XsNTFrEl7rUjw76ZqLd+Gb0YC7tkb6gH/XQmhivO1Big vj/KEhOrX4aBg5RJm7/8Il/aFSCaCUzTZW6c1hSzuH98SpwHHKuYGN7IW Q==; X-CSE-ConnectionGUID: 66HgaiTNS5a1XaeqM3EXdg== X-CSE-MsgGUID: YnnuRWviQlaohksSfUW97Q== X-IronPort-AV: E=Sophos;i="6.07,225,1708412400"; d="scan'208";a="22410971" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Apr 2024 22:35:33 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 23 Apr 2024 22:35:19 -0700 Received: from che-lt-i67131.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 23 Apr 2024 22:35:11 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , CC: , , , , , , , , "Manikandan Muralidharan" Subject: [PATCH RESEND v9 6/8] drm: atmel-hlcdc: add vertical and horizontal scaling support for XLCDC Date: Wed, 24 Apr 2024 11:03:49 +0530 Message-ID: <20240424053351.589830-7-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240424053351.589830-1-manikandan.m@microchip.com> References: <20240424053351.589830-1-manikandan.m@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Update the vertical and horizontal scaler registers of XLCDC IP with Bilinear and Bicubic co-efficients taps for Chroma and Luma componenets of the Pixel. Signed-off-by: Manikandan Muralidharan Acked-by: Sam Ravnborg --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 4 ++++ .../gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h index 1153d402f810..e1a0bb24b511 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h @@ -198,6 +198,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]; @@ -217,6 +219,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 f60367dc6d9d..4a7ba0918eca 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c @@ -966,6 +966,26 @@ static void atmel_xlcdc_csc_init(struct atmel_hlcdc_plane *plane, desc->layout.csc + i, xlcdc_csc_coeffs[i]); } + + 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); + } } static int atmel_hlcdc_plane_init_properties(struct atmel_hlcdc_plane *plane) -- 2.25.1