Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp815892rwd; Tue, 13 Jun 2023 00:16:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60a91McrlUSE82r7jBXBVrD98rKP+S3Wl6UOxcfb66ySW6tSAhxc0bqrqvYfDNAHjEmRGk X-Received: by 2002:a17:907:3f83:b0:94f:704d:a486 with SMTP id hr3-20020a1709073f8300b0094f704da486mr12328709ejc.32.1686640609045; Tue, 13 Jun 2023 00:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686640609; cv=none; d=google.com; s=arc-20160816; b=0j+Kl80SxxjlyuNlGUaNOUcF7BLgdoz1oVi+QZtYR6wGlSEepuBgmTrV/t79k4Nrb2 fhVGY3omK0FGCK+cja+10omvUu5T2qaz77eLX+g69qt/6CLMDOVuLwv4I1R3EoSmPdT1 6vVnD8ERYDc5m38kRO1hPd3mkS39/D1lNt4FqyudTKl6QUnOHd8AVLcJK6V2yDSX1PPl chr/fmyq4yceNriK5cHhTu6/lcnNtAr7R42mGr2SFaTJ0svAXGk9sLSHT0BjUIUTLBAU QH2wMHd6g2dRHevmIZuPsluVcbRBsEjqkTlNMLkSdkZPXcYZiQlF4AvR7s6pWTTHoACI tuPg== 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=osaOVUDCTeq1PWKBuFR+jboA7G6BpwGBXM2L/0MdBi8=; b=XvbhTxn9AdPLiGYhyjE+o6ApQSEDBxEeiEi3cErhg9iGc9EfuUnm2LX9t5gO02R8+L +2JnzYsxrk9htYCV6tShtFT6VKHhKs64Zpego5Buspw1CSADwhGlkkKJFQkiy2tduYBn FjAI3Ij6iVoB0C7+N7R4FFG1K53LX70fXIMZn526YAMsjbkjA6krOmWSJX5NlCH1+wNF nReeJ6TNxvhGR4whQJDEZ3SJs4RwP7SrZS/FABjlKxkViy0P2ioZbf9NmbnuQNu511an sMvVJSGRMsVpcUhemorfw+TZhxfgyt0nwQwz7hnECRgk6gHk7uc6Qh9Xu28OxuFZ38R4 /coQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=pOOOyITO; 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 ot13-20020a170906cccd00b00977e50c2f96si6574535ejb.558.2023.06.13.00.16.24; Tue, 13 Jun 2023 00:16:49 -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=pOOOyITO; 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 S240439AbjFMHGB (ORCPT + 99 others); Tue, 13 Jun 2023 03:06:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238110AbjFMHFu (ORCPT ); Tue, 13 Jun 2023 03:05:50 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6779410F7; Tue, 13 Jun 2023 00:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1686639949; x=1718175949; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z7sh0i6Gl2/LRPzmrS845oLG7MhlbMwUzMTImsVh/hI=; b=pOOOyITOP1Wtaat6scwATLEe7NwZIWFjfRwM+MMUnoi98/veJMevFg0i WaKV0DdwgAgcGCBZlffYU5sDjVv90sgqGko4dg9qabGstxz50kJbq7STy Esb81TBwEbC9eczpBgjsPH09j0T+iWoBtVFhsMHNWYqU/TdFYtwSRib5h 5ltAcalXNbmvUPQyConoo+Su56AtIe4L/1Xm8km2BoFAwhN9NdjENJ5EP X8672+7mRpWTjz51xIK0s/p5PW9zveM+kDZ8nc11uLcOZ3zqNuh6pW7Iy TWWXwpiX7g1OJo6U91twwsBY+pgmUNjfRYatcdkDKCKrPrd6pXZLp7sRJ Q==; X-IronPort-AV: E=Sophos;i="6.00,238,1681196400"; d="scan'208";a="229806838" 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:05:47 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) 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:05:46 -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:05:38 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , , CC: , , , , , , , Manikandan , Durai Manickam KR Subject: [PATCH 5/9] drm: atmel-hlcdc: add compatible string check for XLCDC and HLCDC Date: Tue, 13 Jun 2023 12:34:22 +0530 Message-ID: <20230613070426.467389-6-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 From: Durai Manickam KR Add compatible string check to differentiate XLCDC and HLCDC code within the atmel-hlcdc driver files. Signed-off-by: Durai Manickam KR Signed-off-by: Manikandan Muralidharan --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 7 +++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c index d7ad828e9e8c..fbbd2592efc7 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c @@ -761,6 +761,13 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev) if (!dc) return -ENOMEM; + /* SAM9X7 supports XLCDC */ + if (!strcmp(match->compatible, "microchip,sam9x7-xlcdc")) + dc->is_xlcdc = true; + else + /* Other SoC's that supports HLCDC IP */ + dc->is_xlcdc = false; + dc->desc = match->data; dc->hlcdc = dev_get_drvdata(dev->dev->parent); dev->dev_private = dc; diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h index aed1742b3665..804e4d476f2b 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h @@ -451,6 +451,7 @@ struct atmel_hlcdc_dc { u32 imr; struct drm_atomic_state *state; } suspend; + bool is_xlcdc; }; extern struct atmel_hlcdc_formats atmel_hlcdc_plane_rgb_formats; -- 2.25.1