[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aApPnAA_QLYhNn71@gallifrey>
Date: Thu, 24 Apr 2025 14:50:04 +0000
From: "Dr. David Alan Gilbert" <linux@...blig.org>
To: Alex Deucher <alexdeucher@...il.com>
Cc: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
alexander.deucher@....com, harry.wentland@....com,
sunpeng.li@....com, siqueira@...lia.com, christian.koenig@....com,
airlied@...il.com, simona@...ll.ch, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] drm/radeon: Remove unused radeon_doorbell_free
* Alex Deucher (alexdeucher@...il.com) wrote:
> On Fri, Apr 18, 2025 at 2:18 AM Christophe JAILLET
> <christophe.jaillet@...adoo.fr> wrote:
> >
> > Le 18/04/2025 à 02:21, linux@...blig.org a écrit :
> > > From: "Dr. David Alan Gilbert" <linux@...blig.org>
> > >
> > > radeon_doorbell_free() was added in 2013 by
> > > commit 75efdee11b5d ("drm/radeon: implement simple doorbell page
> > > allocator")
> > > but never used.
> >
> > Hi,
> >
> > I think than instead of being removed, it should be used in the error
> > handling path of cik_init() and in cik_fini().
>
> Yes, ideally. Care to make a patch to fix that?
I can have a look at that.
Dave
> Thanks,
>
> Alex
>
> >
> > CJ
> >
> > >
> > > Remove it.
> > >
> > > Signed-off-by: Dr. David Alan Gilbert <linux@...blig.org>
> > > ---
> > > drivers/gpu/drm/radeon/radeon.h | 1 -
> > > drivers/gpu/drm/radeon/radeon_device.c | 14 --------------
> > > 2 files changed, 15 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> > > index 8605c074d9f7..58111fdf520d 100644
> > > --- a/drivers/gpu/drm/radeon/radeon.h
> > > +++ b/drivers/gpu/drm/radeon/radeon.h
> > > @@ -686,7 +686,6 @@ struct radeon_doorbell {
> > > };
> > >
> > > int radeon_doorbell_get(struct radeon_device *rdev, u32 *page);
> > > -void radeon_doorbell_free(struct radeon_device *rdev, u32 doorbell);
> > >
> > > /*
> > > * IRQS.
> > > diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> > > index bbd39348a7ab..4127ffb4bb6f 100644
> > > --- a/drivers/gpu/drm/radeon/radeon_device.c
> > > +++ b/drivers/gpu/drm/radeon/radeon_device.c
> > > @@ -392,20 +392,6 @@ int radeon_doorbell_get(struct radeon_device *rdev, u32 *doorbell)
> > > }
> > > }
> > >
> > > -/**
> > > - * radeon_doorbell_free - Free a doorbell entry
> > > - *
> > > - * @rdev: radeon_device pointer
> > > - * @doorbell: doorbell index
> > > - *
> > > - * Free a doorbell allocated for use by the driver (all asics)
> > > - */
> > > -void radeon_doorbell_free(struct radeon_device *rdev, u32 doorbell)
> > > -{
> > > - if (doorbell < rdev->doorbell.num_doorbells)
> > > - __clear_bit(doorbell, rdev->doorbell.used);
> > > -}
> > > -
> > > /*
> > > * radeon_wb_*()
> > > * Writeback is the method by which the GPU updates special pages
> >
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
Powered by blists - more mailing lists