Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp3116188lqt; Tue, 23 Apr 2024 10:41:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVvhMZcrpXMwD7Q8pcUmunGrWoAKg/kwui+TnbMPoYUARjRux7tRLGvKyqNZBOy7/ZvKKHqooGO58qroZz6qRx/3dbccCsAAwPv2EXFTQ== X-Google-Smtp-Source: AGHT+IFMwCar5oQg7IlhEN35bBbzY42VMOMPgUNlIg6iFnOE8zpg4VgSeCY7AAc8MMOCd1BZIvvj X-Received: by 2002:a17:90a:b017:b0:2ad:1e60:502a with SMTP id x23-20020a17090ab01700b002ad1e60502amr76358pjq.38.1713894076183; Tue, 23 Apr 2024 10:41:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713894076; cv=pass; d=google.com; s=arc-20160816; b=TLuk9BUz8pWXl0OXGkVEQH3HfYN+XPqOmNCQGMsrFuLvr0Z4tRSaYb7BWymL4BZqow umTruACwtjBKMTmglx+DvEYN51sVWWdgdff3vBq0aYAJHqbdCtsZYJ+5s0RJa2FtAfJZ LoKl/SVYX250NX64scIJR3+Mfqc+r7iazdUIgrZFvSqQkx3VUjX9UwyaYumLqV708UE/ KADFNjQydno7bl9cf5ueXB0c+1OJr/tgGiNFvVcscxCx7L+sUhdmT5DjHUEpgl0P5Wmb SMevjJmw4nhYCjGjNEneF9g8XFCERh/cbCvnJSc25AqJPoKor+0kONWnZ7u+SSNrmTNl ZfLA== 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=OOGt+jSm9xSy5lxg/d3TOjXUukiXICzPkjr8gC7XjPo=; fh=y/ZWbFXBmP32xuuB2aPYQ037wxAyEGcK3dXjHSf7t2w=; b=MMAGvF+Z651F1OJ2cETbz6cw1pZ+hR7sQ4W02g68tGpV5csVuy9uMqKKzeQeqAscFm xc9E0B3U1zuyoP82v6acwfOkYx3UxOXjMaOaSRWrzjXo0FK7pqHd0Z3+5cfQBhM8XgFC dKZrvbm/F0cX0q+adSK0kCVo867yJOi8Uzw0u627B+MFvUW0rqi1iZe2NlDfL5vQJVNe 95cUxEXgrMGH8LL+VP8nmxmq/R9EgH4k4xev6NXpJJI0vK23pxBxwUoI0h90dgamKiza zxdO1tYZ10c6TF5rfTCkslXA6M3y04ccYOqdj23EXg6ORDHBgAqQDxUHFkQ1ArPeQTMQ zZew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KOdnL+Ac; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-155650-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155650-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z8-20020a17090a014800b002a4ac8aca07si9799591pje.101.2024.04.23.10.41.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 10:41:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155650-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KOdnL+Ac; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-155650-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155650-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 A7784B2217C for ; Tue, 23 Apr 2024 17:19:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C5B913E025; Tue, 23 Apr 2024 17:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="KOdnL+Ac" Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (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 D62B813D8B0 for ; Tue, 23 Apr 2024 17:19:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713892758; cv=none; b=OS4QBbo/lP0qiXcfuzqW8GIo4PhHe8fmS5yNt41EuJ5OURBVL5f2doBds0KeT+rUXKL4/JsWOPS2OJsIa2PuhkjiLPsLHj+vrIW2IVhNK4MPV9v3KgwCNUy1zfgxwtWyrLp+03ayrnNH4q2Floln5+0VUtBSQWUiV2Dfue8lAPY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713892758; c=relaxed/simple; bh=VsVfaLDJwUbf4wZb9SlRbtcHLGnKH0YlD3YRgyJ6794=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=r//naDjDMj/wq/mc9IeycDF0kjhNFrSYkEMy2fcfqJMLpWU4oaAmikLOomY+xB7QFSfFo3oWuL4ZVw/19TUecxcSSwsVSDSXr6ReApl+Lcvuid6bI8yTYv15RUvUyOeAqkBjXWanxA5aLzOxduChwqFX95SRNJ4RBwKvHcJ/+Fg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=KOdnL+Ac; arc=none smtp.client-ip=91.218.175.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1713892750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OOGt+jSm9xSy5lxg/d3TOjXUukiXICzPkjr8gC7XjPo=; b=KOdnL+AcNlkTtmXsQ0E00qcw3EBV6jUTFnCleZG3VMQyVLZnU3XUHrC+JMa6OsJaIedvjA slWI6bPqK+DaX3pIX8ujvDS+C0j4UaI/11EXf6KJ4Eg8c6PFajUHWBpPZsKfvsaPVuKU4M KH/xQ+y3aKKnNJUqlQj/jD1TRv/3Hxg= From: Sean Anderson To: Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org Cc: Daniel Vetter , linux-arm-kernel@lists.infradead.org, Michal Simek , linux-kernel@vger.kernel.org, David Airlie , Tomi Valkeinen , Sean Anderson Subject: [PATCH v4 01/13] drm: xlnx: Store base pointers in zynqmp_disp directly Date: Tue, 23 Apr 2024 13:18:47 -0400 Message-Id: <20240423171859.3953024-2-sean.anderson@linux.dev> In-Reply-To: <20240423171859.3953024-1-sean.anderson@linux.dev> References: <20240423171859.3953024-1-sean.anderson@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT The blend, avbuf, and audio members of zynqmp_disp are anonymous structs with only one member each. This is rather pointless, so move the members up a level. Signed-off-by: Sean Anderson Reviewed-by: Tomi Valkeinen --- (no changes since v3) Changes in v3: - New drivers/gpu/drm/xlnx/zynqmp_disp.c | 44 +++++++++++++----------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index 8a39b3accce5..ca164a750ee9 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -128,24 +128,18 @@ struct zynqmp_disp_layer { * struct zynqmp_disp - Display controller * @dev: Device structure * @dpsub: Display subsystem - * @blend.base: Register I/O base address for the blender - * @avbuf.base: Register I/O base address for the audio/video buffer manager - * @audio.base: Registers I/O base address for the audio mixer + * @blend: Register I/O base address for the blender + * @avbuf: Register I/O base address for the audio/video buffer manager + * @audio: Registers I/O base address for the audio mixer * @layers: Layers (planes) */ struct zynqmp_disp { struct device *dev; struct zynqmp_dpsub *dpsub; - struct { - void __iomem *base; - } blend; - struct { - void __iomem *base; - } avbuf; - struct { - void __iomem *base; - } audio; + void __iomem *blend; + void __iomem *avbuf; + void __iomem *audio; struct zynqmp_disp_layer layers[ZYNQMP_DPSUB_NUM_LAYERS]; }; @@ -356,12 +350,12 @@ static const struct zynqmp_disp_format avbuf_gfx_fmts[] = { static u32 zynqmp_disp_avbuf_read(struct zynqmp_disp *disp, int reg) { - return readl(disp->avbuf.base + reg); + return readl(disp->avbuf + reg); } static void zynqmp_disp_avbuf_write(struct zynqmp_disp *disp, int reg, u32 val) { - writel(val, disp->avbuf.base + reg); + writel(val, disp->avbuf + reg); } static bool zynqmp_disp_layer_is_video(const struct zynqmp_disp_layer *layer) @@ -587,7 +581,7 @@ static void zynqmp_disp_avbuf_disable(struct zynqmp_disp *disp) static void zynqmp_disp_blend_write(struct zynqmp_disp *disp, int reg, u32 val) { - writel(val, disp->blend.base + reg); + writel(val, disp->blend + reg); } /* @@ -813,7 +807,7 @@ static void zynqmp_disp_blend_layer_disable(struct zynqmp_disp *disp, static void zynqmp_disp_audio_write(struct zynqmp_disp *disp, int reg, u32 val) { - writel(val, disp->audio.base + reg); + writel(val, disp->audio + reg); } /** @@ -1237,21 +1231,21 @@ int zynqmp_disp_probe(struct zynqmp_dpsub *dpsub) disp->dev = &pdev->dev; disp->dpsub = dpsub; - disp->blend.base = devm_platform_ioremap_resource_byname(pdev, "blend"); - if (IS_ERR(disp->blend.base)) { - ret = PTR_ERR(disp->blend.base); + disp->blend = devm_platform_ioremap_resource_byname(pdev, "blend"); + if (IS_ERR(disp->blend)) { + ret = PTR_ERR(disp->blend); goto error; } - disp->avbuf.base = devm_platform_ioremap_resource_byname(pdev, "av_buf"); - if (IS_ERR(disp->avbuf.base)) { - ret = PTR_ERR(disp->avbuf.base); + disp->avbuf = devm_platform_ioremap_resource_byname(pdev, "av_buf"); + if (IS_ERR(disp->avbuf)) { + ret = PTR_ERR(disp->avbuf); goto error; } - disp->audio.base = devm_platform_ioremap_resource_byname(pdev, "aud"); - if (IS_ERR(disp->audio.base)) { - ret = PTR_ERR(disp->audio.base); + disp->audio = devm_platform_ioremap_resource_byname(pdev, "aud"); + if (IS_ERR(disp->audio)) { + ret = PTR_ERR(disp->audio); goto error; } -- 2.35.1.1320.gc452695387.dirty