Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp270163rdb; Mon, 29 Jan 2024 01:25:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7k6U1F8BF41IY84B9OVpSW9VJVkz1q3tM81ULtaleXeXToN52kzhs6jrCBpVmtK2IYR/M X-Received: by 2002:a05:6a00:1c85:b0:6de:25e6:f6ca with SMTP id y5-20020a056a001c8500b006de25e6f6camr2125682pfw.11.1706520342291; Mon, 29 Jan 2024 01:25:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706520342; cv=pass; d=google.com; s=arc-20160816; b=FsLoauVzFnOcDZM/aPdTdNfd6WTtjU3Sjjnp+jflWdhLuVREd53xQbx7YIUAcINQKO WUPL7YsuyCwcSlzzpf0pr0uuJmnMztlAHsPGqRMHmP9EF/6MVSMojQV3lCz3xqut7sen f3hbAiXJlsSIR2947uaiZRWPRF0rP3nRn3sdXhJnfMXdbcDmdN0fs2BnzbB5jneKKevx cSMUuNYS8glPUjPLh8mcPnKXAJ202Qlhzp08b5J1gUEnT+f6rRcIzWuLOaFnRwPsXoJx LWBckZxAAwTYHwmt+RJw3i7r1CZQEiPnCGINKEWMiZ/RQexNSOkyHFAWszpoC2b14jhW wAYA== 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=F3C3WjxZd4/3yeHX1jhO816GCVBCpqJK1YgOwHJBiq0=; fh=j8BTi3bk6S9w7ne7NAX+MdwHaBs0T0Ouoo68uijiz9I=; b=slbr3ynfD8OD0dBVwUyl40LX+AU0Tk3h+2xOhDRaq0k08rUYh1C6tTmQyhXHkj4s+C /eZdcPopBh8RwPSNzlteU9ENrqIazpaoTXVOYKCqCPosaSRaTZKt5f20BYM/WSRm1yKG KTTt2V3T3DDFoOg0FfoBLClEYxBzAOkoI+h9ekO8pJHvXmst/QypLylIdDlDLP9OlOAL +E0MB6z7QZEhdzWRlZ2BkZg+AxMZu1LyIWlClG+InZldb9b/4gFlUPems4BL1EHVY97y VI52riMDu0MoWwfX9SXFxBskHFNMYlgMKa9euj5n0nMYHwq1ykhMeg2nkxOwUoGNfHqK QGWw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=TsCJXdPj; 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-42438-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42438-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. [139.178.88.99]) by mx.google.com with ESMTPS id 191-20020a6300c8000000b005d4d6060e5dsi5353252pga.377.2024.01.29.01.25.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 01:25:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42438-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=TsCJXdPj; 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-42438-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42438-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 ECAA9281177 for ; Mon, 29 Jan 2024 09:25:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DAB7856740; Mon, 29 Jan 2024 09:25:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="TsCJXdPj" 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 DF51256467 for ; Mon, 29 Jan 2024 09:24:57 +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=1706520300; cv=none; b=jVQyFNNrZTNBeyMqlWli5rCjTl3N3EeMLQZ8uBMxELAvh5FWau9oG3F8oluyNDNY9ErDrjNm0fnrIqU/UiTkUXFmf1pmgQYpkAl6VJxafc7XfHjofXX60bA1jl+d16ItOtq26DyMgSYvaqi5Md6H2Kqz+RQTbFOc5oWuMy41Q+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706520300; c=relaxed/simple; bh=tJbtQ1MlE1W9rRSJGxdgP3sxAM2uACs3ZmeI+EII/UM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=l5lOoOPD/714gCQ9gdIUM0XBFCJ1BhhqTgtq77iFTyL4JEOpSMlkoETG+aiYcxMD+q8qCvvLe+z2wd3fW7OzPCNQPu2fvEZRAQ4MOJ7BujEaZHRoqL6Fp/kRKDVpERisDsUr7N6jyedywx/zziO8NHaHgWEwVM+p0jgink7tac4= 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=TsCJXdPj; 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=1706520297; x=1738056297; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tJbtQ1MlE1W9rRSJGxdgP3sxAM2uACs3ZmeI+EII/UM=; b=TsCJXdPjNUe6IQMffx2rrgFDg1J6EQMvqSA4GKQkhA4yBymgcT5OYja1 RGTEidQQU1zXkzuNwPwdW9/AWXImaA7HKXn35jkGeDcjr80Q685gvAqlI kOxcZEnS5h8VlqYvxRKtAeCmR1d3wxFhQ4riWnsBU5vkyDxVr/8duXbnV th8KeVHZ8RCDG1GQ1NUcHIHjSrhJVjikmz/2DyASDwk1qTito9Pr8rCfu kLbqT308yQkbUoWuycuR4vLue2bhcevxtA9c3aPmKiMvV82DUzjSkBOhC 1O8ynkz11WUEXCGBchsMoernaptS2MbBYI7kLFdbeFwBS8wqdhIYyNeek A==; X-CSE-ConnectionGUID: 8voT20HCQaKMMfd/WNhz6Q== X-CSE-MsgGUID: ca0RYYTXSn6TmRIBQq1YHg== X-IronPort-AV: E=Sophos;i="6.05,226,1701154800"; d="scan'208";a="16727010" 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 Jan 2024 02:24:56 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) 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; Mon, 29 Jan 2024 02:24:27 -0700 Received: from che-lt-i67131.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Mon, 29 Jan 2024 02:24:20 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , CC: , , , , , , , Manikandan Muralidharan Subject: [PATCH RESEND v7 1/7] drm: atmel-hlcdc: add flag and driver ops to differentiate XLCDC and HLCDC IP Date: Mon, 29 Jan 2024 14:53:13 +0530 Message-ID: <20240129092319.199365-2-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240129092319.199365-1-manikandan.m@microchip.com> References: <20240129092319.199365-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 Add is_xlcdc flag and LCD IP specific ops in driver data to differentiate XLCDC and HLCDC code within the atmel-hlcdc driver files. Signed-off-by: Manikandan Muralidharan --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 37 ++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h index 5b5c774e0edf..d5e01ff8c7f9 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h @@ -177,6 +177,9 @@ struct atmel_hlcdc_layer_cfg_layout { int csc; }; +struct atmel_hlcdc_plane_state; +struct atmel_hlcdc_dc; + /** * Atmel HLCDC DMA descriptor structure * @@ -288,6 +291,36 @@ atmel_hlcdc_layer_to_plane(struct atmel_hlcdc_layer *layer) return container_of(layer, struct atmel_hlcdc_plane, layer); } +/** + * struct atmel_lcdc_dc_ops - describes atmel_lcdc ops group + * to differentiate HLCDC and XLCDC IP code support. + * @plane_setup_scaler: update the vertical and horizontal scaling factors + * @update_lcdc_buffers: update the each LCDC layers DMA registers. + * @lcdc_atomic_disable: disable LCDC interrupts and layers + * @lcdc_update_general_settings: update each LCDC layers general + * confiugration register. + * @lcdc_atomic_update: enable the LCDC layers and interrupts. + * @lcdc_csc_init: update the color space conversion co-efficient of + * High-end overlay register. + * @lcdc_irq_dbg: to raise alert incase of interrupt overrun in any LCDC layer. + */ +struct atmel_lcdc_dc_ops { + void (*plane_setup_scaler)(struct atmel_hlcdc_plane *plane, + struct atmel_hlcdc_plane_state *state); + void (*update_lcdc_buffers)(struct atmel_hlcdc_plane *plane, + struct atmel_hlcdc_plane_state *state, + u32 sr, int i); + void (*lcdc_atomic_disable)(struct atmel_hlcdc_plane *plane); + void (*lcdc_update_general_settings)(struct atmel_hlcdc_plane *plane, + struct atmel_hlcdc_plane_state *state); + void (*lcdc_atomic_update)(struct atmel_hlcdc_plane *plane, + struct atmel_hlcdc_dc *dc); + void (*lcdc_csc_init)(struct atmel_hlcdc_plane *plane, + const struct atmel_hlcdc_layer_desc *desc); + void (*lcdc_irq_dbg)(struct atmel_hlcdc_plane *plane, + const struct atmel_hlcdc_layer_desc *desc); +}; + /** * Atmel HLCDC Display Controller description structure. * @@ -304,8 +337,10 @@ atmel_hlcdc_layer_to_plane(struct atmel_hlcdc_layer *layer) * @conflicting_output_formats: true if RGBXXX output formats conflict with * each other. * @fixed_clksrc: true if clock source is fixed + * @is_xlcdc: true if XLCDC IP is supported * @layers: a layer description table describing available layers * @nlayers: layer description table size + * @ops: atmel lcdc dc ops */ struct atmel_hlcdc_dc_desc { int min_width; @@ -317,8 +352,10 @@ struct atmel_hlcdc_dc_desc { int max_hpw; bool conflicting_output_formats; bool fixed_clksrc; + bool is_xlcdc; const struct atmel_hlcdc_layer_desc *layers; int nlayers; + const struct atmel_lcdc_dc_ops *ops; }; /** -- 2.25.1