dri-devel Archive on lore.kernel.org
 help / color / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 7/7] radeon: kill rdev->pciep_(r|w)reg
Date: Mon, 29 Nov 2010 10:43:43 -0500
Message-ID: <AANLkTimqbN4k182PJq=vFMxncqcDko71bU6SfGbSZ8ir@mail.gmail.com> (raw)
In-Reply-To: <1290967575-22705-8-git-send-email-daniel.vetter@ffwll.ch>

On Sun, Nov 28, 2010 at 1:06 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> pciep_wreg is totally unused, rreg has only one caller and
> already checks whether it's an r600 or later chip.
>

I'd rather keep this like it is for consistency with the other
register access routines and I have some patches in the pipeline that
use both the read and write methods.

Alex

> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/radeon/r300.c        |    3 ++-
>  drivers/gpu/drm/radeon/r600.c        |    8 --------
>  drivers/gpu/drm/radeon/radeon.h      |    4 ----
>  drivers/gpu/drm/radeon/radeon_asic.c |    6 ------
>  drivers/gpu/drm/radeon/radeon_asic.h |    1 -
>  5 files changed, 2 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
> index cde1d34..6def8d7 100644
> --- a/drivers/gpu/drm/radeon/r300.c
> +++ b/drivers/gpu/drm/radeon/r300.c
> @@ -561,7 +561,8 @@ int rv370_get_pcie_lanes(struct radeon_device *rdev)
>        if (rdev->family < CHIP_R600)
>                link_width_cntl = RREG32_PCIE(RADEON_PCIE_LC_LINK_WIDTH_CNTL);
>        else
> -               link_width_cntl = RREG32_PCIE_P(RADEON_PCIE_LC_LINK_WIDTH_CNTL);
> +               link_width_cntl = r600_pciep_rreg(rdev,
> +                                                 RADEON_PCIE_LC_LINK_WIDTH_CNTL);
>
>        switch ((link_width_cntl & RADEON_PCIE_LC_LINK_WIDTH_RD_MASK) >> RADEON_PCIE_LC_LINK_WIDTH_RD_SHIFT) {
>        case RADEON_PCIE_LC_LINK_WIDTH_X0:
> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
> index b55ee28..a5114ff 100644
> --- a/drivers/gpu/drm/radeon/r600.c
> +++ b/drivers/gpu/drm/radeon/r600.c
> @@ -1905,14 +1905,6 @@ u32 r600_pciep_rreg(struct radeon_device *rdev, u32 reg)
>        return r;
>  }
>
> -void r600_pciep_wreg(struct radeon_device *rdev, u32 reg, u32 v)
> -{
> -       WREG32(PCIE_PORT_INDEX, ((reg) & 0xff));
> -       (void)RREG32(PCIE_PORT_INDEX);
> -       WREG32(PCIE_PORT_DATA, (v));
> -       (void)RREG32(PCIE_PORT_DATA);
> -}
> -
>  /*
>  * CP & Ring
>  */
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 7afb08e..5fec64c 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -1117,8 +1117,6 @@ struct radeon_device {
>        radeon_rreg_t                   pll_rreg;
>        radeon_wreg_t                   pll_wreg;
>        uint32_t                        pcie_reg_mask;
> -       radeon_rreg_t                   pciep_rreg;
> -       radeon_wreg_t                   pciep_wreg;
>        /* io port */
>        void __iomem                    *rio_mem;
>        resource_size_t                 rio_mem_size;
> @@ -1223,8 +1221,6 @@ static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32
>  #define WREG32_MC(reg, v) rdev->mc_wreg(rdev, (reg), (v))
>  #define RREG32_PCIE(reg) rv370_pcie_rreg(rdev, (reg))
>  #define WREG32_PCIE(reg, v) rv370_pcie_wreg(rdev, (reg), (v))
> -#define RREG32_PCIE_P(reg) rdev->pciep_rreg(rdev, (reg))
> -#define WREG32_PCIE_P(reg, v) rdev->pciep_wreg(rdev, (reg), (v))
>  #define WREG32_P(reg, val, mask)                               \
>        do {                                                    \
>                uint32_t tmp_ = RREG32(reg);                    \
> diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
> index 3d73fe4..668351c 100644
> --- a/drivers/gpu/drm/radeon/radeon_asic.c
> +++ b/drivers/gpu/drm/radeon/radeon_asic.c
> @@ -60,8 +60,6 @@ static void radeon_register_accessor_init(struct radeon_device *rdev)
>        rdev->mc_wreg = &radeon_invalid_wreg;
>        rdev->pll_rreg = &radeon_invalid_rreg;
>        rdev->pll_wreg = &radeon_invalid_wreg;
> -       rdev->pciep_rreg = &radeon_invalid_rreg;
> -       rdev->pciep_wreg = &radeon_invalid_wreg;
>
>        /* Don't change order as we are overridding accessor. */
>        if (rdev->family < CHIP_RV515) {
> @@ -94,10 +92,6 @@ static void radeon_register_accessor_init(struct radeon_device *rdev)
>                rdev->mc_rreg = &rs600_mc_rreg;
>                rdev->mc_wreg = &rs600_mc_wreg;
>        }
> -       if ((rdev->family >= CHIP_R600) && (rdev->family <= CHIP_RV740)) {
> -               rdev->pciep_rreg = &r600_pciep_rreg;
> -               rdev->pciep_wreg = &r600_pciep_wreg;
> -       }
>  }
>
>
> diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
> index 8e75be1..bad4b88 100644
> --- a/drivers/gpu/drm/radeon/radeon_asic.h
> +++ b/drivers/gpu/drm/radeon/radeon_asic.h
> @@ -294,7 +294,6 @@ void r600_wb_fini(struct radeon_device *rdev);
>  void r600_cp_commit(struct radeon_device *rdev);
>  void r600_pcie_gart_tlb_flush(struct radeon_device *rdev);
>  uint32_t r600_pciep_rreg(struct radeon_device *rdev, uint32_t reg);
> -void r600_pciep_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
>  int r600_cs_parse(struct radeon_cs_parser *p);
>  void r600_fence_ring_emit(struct radeon_device *rdev,
>                          struct radeon_fence *fence);
> --
> 1.7.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

      reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-28 18:06 [PATCH 0/7] radeon_asic header cleanup, part 2 Daniel Vetter
2010-11-28 18:06 ` [PATCH 1/7] radeon: consolidate asic-specific function decls for pre-r600 Daniel Vetter
2010-11-29 15:29   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 2/7] radeon: consolidate asic-specific function decls for r600 & later Daniel Vetter
2010-11-29 15:34   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 3/7] radeon: drop extern from function decls Daniel Vetter
2010-11-29 15:36   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 4/7] radeon: kill decls for inline functions Daniel Vetter
2010-11-29 15:37   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 5/7] radeon: move blit functions to radeon_asic.h Daniel Vetter
2010-11-29 15:37   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 6/7] radeon: kill r100_io_(r|w)reg Daniel Vetter
2010-11-29 15:40   ` Alex Deucher
2010-11-28 18:06 ` [PATCH 7/7] radeon: kill rdev->pciep_(r|w)reg Daniel Vetter
2010-11-29 15:43   ` Alex Deucher [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTimqbN4k182PJq=vFMxncqcDko71bU6SfGbSZ8ir@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

dri-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dri-devel/0 dri-devel/git/0.git
	git clone --mirror https://lore.kernel.org/dri-devel/1 dri-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dri-devel dri-devel/ https://lore.kernel.org/dri-devel \
		dri-devel@lists.freedesktop.org
	public-inbox-index dri-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.dri-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git