Skip to content

drm/ast: Clean up access to non-MMIO registers

Thomas Zimmermann dri-devel stable 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest15 patches 0 repliesNew
  2. v115 patches 17 repliesSuperseded

Changes in v2 from the cover letter

- fix typo (Jocelyn)
- fix subject of cover letter
- convert more MCR registers on Gen6

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15drm/ast: dp501: Fix initialization of SCU2Cdrivers/gpu/drm/ast/ast_dp501.c+1 -10 replies
2/15drm/ast: Move 32-bit register-access helpers to ast_drv.{c, h}drivers/gpu/drm/ast/ast_drv.c drivers/gpu/drm/ast/ast_drv.h drivers/gpu/drm/ast/ast_post.c +2 more+108 -630 replies
3/15drm/ast: Use constants for AHBC registersdrivers/gpu/drm/ast/ast_2500.c drivers/gpu/drm/ast/ast_reg.h+14 -30 replies
4/15drm/ast: Use constants for MCR registersdrivers/gpu/drm/ast/ast_2000.c drivers/gpu/drm/ast/ast_2100.c drivers/gpu/drm/ast/ast_2300.c +5 more+373 -3020 replies
5/15drm/ast: Use constants for SCU registersdrivers/gpu/drm/ast/ast_2300.c drivers/gpu/drm/ast/ast_2500.c drivers/gpu/drm/ast/ast_dp501.c +1 more+76 -570 replies
6/15drm/ast: Use constants for A2P registersdrivers/gpu/drm/ast/ast_2300.c drivers/gpu/drm/ast/ast_reg.h+11 -30 replies
7/15drm/ast: Use constants for WDT registersdrivers/gpu/drm/ast/ast_2500.c drivers/gpu/drm/ast/ast_reg.h+23 -100 replies
8/15drm/ast: Use constants for SDRAM registersdrivers/gpu/drm/ast/ast_2500.c drivers/gpu/drm/ast/ast_reg.h+17 -70 replies
9/15drm/ast: Store register addresses in struct ast_dramstructdrivers/gpu/drm/ast/ast_2000.c drivers/gpu/drm/ast/ast_2100.c drivers/gpu/drm/ast/ast_post.h +1 more+131 -1280 replies
10/15drm/ast: Gen1: Fix open-coded register accessdrivers/gpu/drm/ast/ast_2000.c drivers/gpu/drm/ast/ast_drv.c drivers/gpu/drm/ast/ast_drv.h +1 more+22 -110 replies
11/15drm/ast: Gen2: Fix open-coded register accessdrivers/gpu/drm/ast/ast_2100.c+38 -350 replies
12/15drm/ast: Gen4: Fix open-coded register accessdrivers/gpu/drm/ast/ast_2300.c drivers/gpu/drm/ast/ast_reg.h+10 -150 replies
13/15drm/ast: Gen6: Fix open-coded register accessdrivers/gpu/drm/ast/ast_2500.c drivers/gpu/drm/ast/ast_reg.h+9 -80 replies
14/15drm/ast: dp501: Fix open-coded register accessdrivers/gpu/drm/ast/ast_dp501.c drivers/gpu/drm/ast/ast_reg.h+64 -660 replies
15/15drm/ast: Fix open-coded scu_rev accessdrivers/gpu/drm/ast/ast_drv.c drivers/gpu/drm/ast/ast_reg.h+7 -70 replies

Reviews trailers per patch

All 15 patches have a Reviewed-by or Acked-by.

PatchJocelyn Falempe
1/15R-b
2/15R-b
3/15R-b
4/15R-b
5/15R-b
6/15R-b
7/15R-b
8/15R-b
9/15R-b
10/15R-b
11/15R-b
12/15R-b
13/15R-b
14/15R-b
15/15R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/15] drm/ast: Clean up access to non-MMIO registers

(was: drm/ast: Clean up access to MMIO registers)

Aspeed devices up to Gen6 contain internal memory that is accessible from the host via the P2A bridge. The helpers ast_moutdwm() and ast_mindwm() pick a 64-KiB segment of the memory to expose to the host, which then has the content available. Content is either registers of the various IP blocks or on-board system memory.

Clean up the driver code involved and provide macro constants for the registers used by the ast driver. Go through the driver and replace the magic values with the constants.

The first patch of the series fixes a bug that has been found while working on these changes. The DP501 writes the content of register SCU2C to the wrong address. The fix is a separate patch to ease backporting.

Smoke-tested on AST2100, AST2300, AST2500 and AST2600.

v2:
- fix typo (Jocelyn)
- fix subject of cover letter
- convert more MCR registers on Gen6

Thomas Zimmermann (15):
drm/ast: dp501: Fix initialization of SCU2C drm/ast: Move 32-bit register-access helpers to ast_drv.{c,h} drm/ast: Use constants for AHBC registers
drm/ast: Use constants for MCR registers
drm/ast: Use constants for SCU registers
drm/ast: Use constants for A2P registers
drm/ast: Use constants for WDT registers
drm/ast: Use constants for SDRAM registers
drm/ast: Store register addresses in struct ast_dramstruct drm/ast: Gen1: Fix open-coded register access drm/ast: Gen2: Fix open-coded register access drm/ast: Gen4: Fix open-coded register access drm/ast: Gen6: Fix open-coded register access drm/ast: dp501: Fix open-coded register access drm/ast: Fix open-coded scu_rev access

 drivers/gpu/drm/ast/ast_2000.c  |  61 +++--
 drivers/gpu/drm/ast/ast_2100.c  | 292 +++++++++++------------
 drivers/gpu/drm/ast/ast_2300.c  | 398 ++++++++++++++++----------------
 drivers/gpu/drm/ast/ast_2500.c  | 329 +++++++++++++-------------
 drivers/gpu/drm/ast/ast_dp501.c | 146 ++++++------
 drivers/gpu/drm/ast/ast_drv.c   |  84 ++++++-
 drivers/gpu/drm/ast/ast_drv.h   |  60 +++--
 drivers/gpu/drm/ast/ast_post.c  |  48 +---
 drivers/gpu/drm/ast/ast_post.h  |  20 +-
 drivers/gpu/drm/ast/ast_reg.h   | 156 +++++++++++++
 10 files changed, 891 insertions(+), 703 deletions(-)

base-commit: 5cb7d14d9bd2061386a0192a4649626a3e3a5ec3

Signature · 1 line
2.53.0