Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp85053lqg; Thu, 29 Feb 2024 21:27:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXkdeFS7yd9xqo34ZLxL1HEbnE+KD8oCF8E0Fx8rZEzOeT2P1SAQfGlFrP4BXzUd5NWCEnHKMCFpnE92xflcL7QC27OTvBzX6AxUCoZqA== X-Google-Smtp-Source: AGHT+IGaf1JQtfD6LslT1S3OY715s7G56OQmO8yiozCQ13g6mm68PDl/URz41U4aYSwrylFXJspy X-Received: by 2002:a05:6808:1408:b0:3c0:3d0c:edc9 with SMTP id w8-20020a056808140800b003c03d0cedc9mr861573oiv.5.1709270852961; Thu, 29 Feb 2024 21:27:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709270852; cv=pass; d=google.com; s=arc-20160816; b=J0HhF9zNxaWW8OJmmIEhSpUEMM1tpGubIG5mISkCUOowD8kSrsf4HgFStwVLsuLr0f yDrflRKDN5ltt8Z3GL31rB/7Qi9O44smtSs4aNI1CY/0K2Ak6SrjargKcIiGEAVXgZcT VHh5iu5k3UaJl1Xyt4OLKTh699XNsaK8s1Yrlr2fZx4FP4SOflFPCBpi8RJFRmYJrW0f WsDQ5GsYc88r+XQd8S3QKDr1kmOl0yQnQrIncpJXEnNjG/BFJXGPdf7QGAPitHTjaEm5 of5dNnHM9zBrmWQjPsVDBYvB7KmzwS2VIYk8g/6nBW6XK9LU8DvmfsPb6/Lq4hNK+kps o8rg== 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=oruro5sRZXRLOdoPXOtkRDcyS+L39iYUSClfdVaE4+4=; fh=7zDsz27mBsgtoAIkbjOnm5GqQoRyvNqJW2tpYGq12lU=; b=yoeyAO9A7dRYY6xzqQUnOWU13WVeE30v/heiM8u29oGa0i3bTS+RhRNGQuB2z30SQS RI7frRBEnoK80rsn5ZGcIDCWsM3yU6VOT6p2czVbU7DxR+HDpnA/9Le98BAWHOiZmkGF wBtrWbQiqAKlSfP+tCpHS4E9MNfpQA6WvT5zrkio0CHkniGATcQpdycnGgflMIXV+GR4 oD0JJQCGkFu7x+qNyPrt9/roWoqzxS8JhRDaDhaDxnZVCxYdv1951NhiLQIRR0GUftv+ x58EPzzBTjNAEkijDRX6hbq/TOg2tX0MQvmxWfmgkjmsAp2me+wAw1E9Gpc+1989S4+D 4nuQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=Ri5DnnJg; 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-87921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87921-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fa26-20020a056a002d1a00b006e57666b095si2925979pfb.82.2024.02.29.21.27.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 21:27:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=Ri5DnnJg; 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-87921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87921-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9C1AF2821D8 for ; Fri, 1 Mar 2024 05:27:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F83D54750; Fri, 1 Mar 2024 05:27:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="Ri5DnnJg" 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 AF1A853E0D for ; Fri, 1 Mar 2024 05:27:03 +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=1709270825; cv=none; b=UpgL72djq51PxY6vE2BTClqwyV2pKARQbgYLs+HM6e2tRn7akClg90zVCRiQTZxyumAU1H9qy0nAkNxo6FoIAlAi8QG5ZxDrQNX+hmuIe2OQDB+LaGFcugjtD3UvcCPqNT3Me4TQJigddmo2wFgZ7XbaeTL1atOjWEUbezVe2/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709270825; c=relaxed/simple; bh=sGj2r3BTZtlTZdhXJyW5ZMuKV0lCaO7NB6RlNOiv/9M=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SD0CrXTk8UKlcU3FqtuZuqcM2vJ/4CrA9EFpYeMuXiAJ8Y7gZo/Lkj8O50od9wm1fP5W2j3Cn11QjMdT0PDZnyaiXuUnurG0dBgLm7rWH0oiC+vDM29Mx1EEAD1yoksTvkNrAzeffFv5pxN9VPE7YAKgEHLW1Jl+CuJAVNmU+K4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=Ri5DnnJg; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=1709270823; x=1740806823; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sGj2r3BTZtlTZdhXJyW5ZMuKV0lCaO7NB6RlNOiv/9M=; b=Ri5DnnJgUK0rpcfZYew5MncRiN440LfMw8is0mqHAtW02IhPfuKeII23 3swFQronjy6yInh8+RrqzsnqGHANmxYWb4sA+ct8K0GHkZqAILpxBs8g6 lMHDG10owwXWg6mxv1txFXDu9d32kA+p0LLvQ/Hebki2V+tgAvV3vF+08 MLACr4tKnXq/6y/8L0Y51FVNqdvwuMYQ/NwwExffryfeaRArTAq1MVohZ t9lwsu2DGzrZQpoduSuUen3HMIWoTyJ/R8QY6bah13FOop8/UKm15rfP1 /sP2tbg4ALdmmOuA/EXVbtP6MldyMZQ7ceFDLqU5IePwf530LMAkuJQ/j Q==; X-CSE-ConnectionGUID: 6cUC41M7S5CRl+XUlEKwVg== X-CSE-MsgGUID: trh9EL9ARQab2pj+Ip0jJA== X-IronPort-AV: E=Sophos;i="6.06,195,1705388400"; d="scan'208";a="18663418" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 29 Feb 2024 22:27:00 -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; Thu, 29 Feb 2024 22:26:46 -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; Thu, 29 Feb 2024 22:26:38 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , CC: , , , , , , , , "Manikandan Muralidharan" Subject: [PATCH v9 6/8] drm: atmel-hlcdc: add vertical and horizontal scaling support for XLCDC Date: Fri, 1 Mar 2024 10:55:32 +0530 Message-ID: <20240301052534.38651-7-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240301052534.38651-1-manikandan.m@microchip.com> References: <20240301052534.38651-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 --- 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 8a5419ccc343..55ce4b2fcb88 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