From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF109472782 for ; Thu, 30 Apr 2026 16:36:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777567013; cv=none; b=V7zOm8hjXL1j63mxRRaWXpMsIorJo06iMCzPZm6XbCX9Rk8LW7U+EnGKSsY5xhCfbAnGz5TgNRS8V1iiildLP7I7fVx6NxgiLRZDgN0AyCtDnvHeapwRmpeaVCAuk618P8thiQBiTD+aJr7LhoQ/ZKAlHZJnNFTdmaz7KOuQ4D4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777567013; c=relaxed/simple; bh=Zv9lzobn8czFLu5BMX7JmYoyQ8n7ISSdzoGd9HjAmFQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=m21VvetaHXk/pOAqTc+ecLYxUehZV7+fbsy3/NIdd9HTmDGhwxV08OIAoUy/0xa1s7UcQwZ0r1KayNsJbGQE/OMqsitrYcSYux2CQ3VEBDLlryk2plSsqRZ9blLs5LY8xVhpxeaupGPf63Pxh1PnWkrdLXLRhz3o6S/7OSPDplA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=FFGxw+n8; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="FFGxw+n8" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B79CE32D1 for ; Thu, 30 Apr 2026 09:36:42 -0700 (PDT) Received: from [192.168.0.1] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0193B3F62B for ; Thu, 30 Apr 2026 09:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1777567008; bh=Zv9lzobn8czFLu5BMX7JmYoyQ8n7ISSdzoGd9HjAmFQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FFGxw+n8mcA9eCo6iHuimL4/Yl0XxWWEbLx2cNMnhjcQMd7Ihjtv39UMqG0zsLns0 iQJnNFmLhhgInSzGy0dcSUA2L/5ZSuM8GRMyfAAQ5WgVjt7OYpTfVQPM2p9R+A10xw NAu0NgjQ8w9DHXGhZj28VoE5P+u+Q0BjaUvaFnZQ= Date: Thu, 30 Apr 2026 17:36:36 +0100 From: Liviu Dudau To: Karunika Choo Cc: dri-devel@lists.freedesktop.org, nd@arm.com, Boris Brezillon , Steven Price , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/8] drm/panthor: Localize register access by component Message-ID: References: <20260427155934.416502-1-karunika.choo@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260427155934.416502-1-karunika.choo@arm.com> On Mon, Apr 27, 2026 at 04:59:26PM +0100, Karunika Choo wrote: > Hi all, > > This series refactors the panthor register access paths so that each > component uses its own local iomem base instead of relying on the > global device mapping throughout the driver. > > Today a number of register definitions and helpers are still expressed > in terms of the full device register space, which makes it easy for one > component to reach into another component's registers. > > The series prepares the driver for a cleaner per-component layout in 3 > steps: > - make the low-level GPU register helpers operate on an iomem pointer > rather than a panthor_device pointer > - split register definitions and move cross-component accesses behind > helpers owned by the relevant component > - convert GPU, PWR, firmware and MMU code to use component-local iomem > bases, while keeping IRQ handling on a dedicated IRQ-local base. > > The end result is that register accesses become more obviously scoped to > the component that owns them, cross-component register accesses are > removed from callers, and the common IRQ helpers no longer depend on > absolute register offsets. > > No functional change is intended. > > v3: > - Picked up Acks and Reviewed-bys from Boris, Liviu, and Steve. > - Cleaned up definition of pwr->iomem and pwr->irq.iomem. > - Link to v2: https://lore.kernel.org/all/20260412142951.2309135-1-karunika.choo@arm.com/ > v2: > - Picked up Acks from Boris. > - Moved GPU_ID definitions into panthor_gpu_regs.h and deleted > panthor_hw_regs.h > - Fixed incorrect spelling of timestamp helper functions. > - Changed IRQ request function to take an iomem pointer instead of an > offset. > - Update panthor_gpu_info_init() to use the correct block-local iomem > pointers for register accesses. > - Link to v1: https://lore.kernel.org/all/20260410164637.549145-1-karunika.choo@arm.com/ > > Kind regards, > Karunika Pushed to drm-misc-next. Best regards, Liviu > > Karunika Choo (8): > drm/panthor: Pass an iomem pointer to GPU register access helpers > drm/panthor: Split register definitions by components > drm/panthor: Replace cross-component register accesses with helpers > drm/panthor: Store IRQ register base iomem pointer in panthor_irq > drm/panthor: Use a local iomem base for GPU registers > drm/panthor: Use a local iomem base for PWR registers > drm/panthor: Use a local iomem base for firmware control registers > drm/panthor: Use a local iomem base for MMU AS registers > > drivers/gpu/drm/panthor/panthor_device.c | 28 +- > drivers/gpu/drm/panthor/panthor_device.h | 92 ++++--- > drivers/gpu/drm/panthor/panthor_drv.c | 7 +- > drivers/gpu/drm/panthor/panthor_fw.c | 40 ++- > drivers/gpu/drm/panthor/panthor_fw.h | 1 + > drivers/gpu/drm/panthor/panthor_fw_regs.h | 29 ++ > drivers/gpu/drm/panthor/panthor_gpu.c | 101 +++++-- > drivers/gpu/drm/panthor/panthor_gpu.h | 6 + > drivers/gpu/drm/panthor/panthor_gpu_regs.h | 119 +++++++++ > drivers/gpu/drm/panthor/panthor_heap.c | 2 +- > drivers/gpu/drm/panthor/panthor_hw.c | 54 ++-- > drivers/gpu/drm/panthor/panthor_hw.h | 2 +- > drivers/gpu/drm/panthor/panthor_mmu.c | 46 ++-- > drivers/gpu/drm/panthor/panthor_mmu_regs.h | 69 +++++ > drivers/gpu/drm/panthor/panthor_pwr.c | 93 ++++--- > drivers/gpu/drm/panthor/panthor_pwr_regs.h | 79 ++++++ > drivers/gpu/drm/panthor/panthor_regs.h | 291 --------------------- > drivers/gpu/drm/panthor/panthor_sched.c | 5 +- > 18 files changed, 584 insertions(+), 480 deletions(-) > create mode 100644 drivers/gpu/drm/panthor/panthor_fw_regs.h > create mode 100644 drivers/gpu/drm/panthor/panthor_gpu_regs.h > create mode 100644 drivers/gpu/drm/panthor/panthor_mmu_regs.h > create mode 100644 drivers/gpu/drm/panthor/panthor_pwr_regs.h > delete mode 100644 drivers/gpu/drm/panthor/panthor_regs.h > > -- > 2.43.0 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯