Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp824586rwd; Tue, 13 Jun 2023 00:25:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6tpWRYn3dGu55GLGJMNJC+TeB/mieBihKxVb77o2FRL1SoVIKVCMRol1Md9ERqogdoWiuD X-Received: by 2002:a05:6808:199c:b0:398:f741:7589 with SMTP id bj28-20020a056808199c00b00398f7417589mr7764781oib.3.1686641145392; Tue, 13 Jun 2023 00:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686641145; cv=none; d=google.com; s=arc-20160816; b=cVrUkS6U4maEBXXWsBEbPBpBtsX6pwR5AC9EJO1qUf/ThkZ7vwH1FKtI4NBvkP98l2 liIzaoSqlC3tmft2H0qSHKXP78864e85rSPIs8Sx7Hqx1XFH1dNmWXq5D6f8kEJRqu5U TidBOaa3daPlpfkS/pURxok1+kC5vAGGdme6cpd2B36ziyLIKohDIRtLCNX07eDll+Wi /j6UgqVPKg9C8/lv+qMvLx6Feqk5UpTag2Y8D0Sdtc6M1SJmj8tW/my25a8EtDSj8a6E +qv3JkIK63t0sT6RMqq4ejqIuAijJpsYABYqLzqfEjUG4sO08mcP/DR2dNQjJIIrxbTr jpIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Fvz2dYJMeiiQeGebM1sec+xiafj4LkbWST3rnsWkMIU=; b=rjvgOZCYQu5cqWlMUHbtN+DCFCpV+CRkvefHsN7brJD+cDQdnRWi0KjXMfS/Hh6jxR AhxMaNOxknrHl9j+fiw/EvG/Iqb79ayzcACSscaZVRq3c2atNFOUl5WStm2t01oOYF66 4br54/juFkIEmdvXaunVQb9kLoLArXURRuejIUdQ5wbw35RQ/xZIeKQZPrDAngzqSsED ksZ8duCazlXxjzoHVJbd6H03JKXR9LZRACAtftSOKV7pd+DemyWzmTv0rbcamuBYeB01 j2Dyi6NLGpuQ4B8nO/yL1GGcLve5nH/W6sJc3z/PoU22H64UW6DFHiDuD6hubDURknMy gGtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=vdUibDuR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h5-20020a17090ac38500b0025bcbc20b9esi4106463pjt.74.2023.06.13.00.25.32; Tue, 13 Jun 2023 00:25:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=vdUibDuR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240429AbjFMHHY (ORCPT + 99 others); Tue, 13 Jun 2023 03:07:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240424AbjFMHG6 (ORCPT ); Tue, 13 Jun 2023 03:06:58 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29B081985; Tue, 13 Jun 2023 00:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1686639979; x=1718175979; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NtZ1w67xZL59awaoTi+PT78oJSyEe138AbnOfIJ/pYE=; b=vdUibDuRWk/PHROamlm0fMa5/mERNIgi3kwTbT47CimZDXEGHH6MQOZh pDKMNbdoazSZ+HFCZVtkqm3wqYecOCRehK+Ulx8HwGmkJp4/QLtu52J9R VuLHD72HUiGMB0J8i3kXohiHJyBUiDwwMMRDxZ/xBFXo9y3y+peSM2xpt BS1TfkznVw2hraTLqnobqGH1kBWopNC53UzXp78vVqmlI7HjAnHqfB0E5 efATYzI730SZXOD9DqOicXxTS+mDr1H5jwrKUcbtz0QkqBpOIiMjWmPmZ PqL7dmdb2Yfmug573YJOZ76Im2e+LkyCjJHtZKQUQkE6FBslSzIuezsJv g==; X-IronPort-AV: E=Sophos;i="6.00,238,1681196400"; d="scan'208";a="229806934" 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/AES256-SHA256; 13 Jun 2023 00:06:16 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 13 Jun 2023 00:06:14 -0700 Received: from che-lt-i67131.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Tue, 13 Jun 2023 00:06:06 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , , CC: , , , , , , , Manikandan Subject: [PATCH 8/9] drm: atmel-hlcdc: add vertical and horizontal scaling support for XLCDC Date: Tue, 13 Jun 2023 12:34:25 +0530 Message-ID: <20230613070426.467389-9-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230613070426.467389-1-manikandan.m@microchip.com> References: <20230613070426.467389-1-manikandan.m@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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