All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <linux@treblig.org>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	alexander.deucher@amd.com, harry.wentland@amd.com,
	sunpeng.li@amd.com, siqueira@igalia.com,
	christian.koenig@amd.com, airlied@gmail.com, simona@ffwll.ch,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] drm/radeon: Remove unused radeon_doorbell_free
Date: Thu, 24 Apr 2025 14:50:04 +0000	[thread overview]
Message-ID: <aApPnAA_QLYhNn71@gallifrey> (raw)
In-Reply-To: <CADnq5_MrEQ2XGbNho6xd9Um0R6kEEpZBeu0e-97o6-D=juD0gw@mail.gmail.com>

* Alex Deucher (alexdeucher@gmail.com) wrote:
> On Fri, Apr 18, 2025 at 2:18 AM Christophe JAILLET
> <christophe.jaillet@wanadoo.fr> wrote:
> >
> > Le 18/04/2025 à 02:21, linux@treblig.org a écrit :
> > > From: "Dr. David Alan Gilbert" <linux@treblig.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@treblig.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   |_______/

  reply	other threads:[~2025-04-25  7:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18  0:21 [PATCH 0/4] drm/amd & radeon deadcoding linux
2025-04-18  0:21 ` [PATCH 1/4] drm/radeon/radeon_audio: Remove unused r600_hdmi_audio_workaround linux
2025-04-18  0:21 ` [PATCH 2/4] drm/radeon: Remove unused radeon_doorbell_free linux
2025-04-18  5:52   ` Christophe JAILLET
2025-04-18 12:59     ` Alex Deucher
2025-04-24 14:50       ` Dr. David Alan Gilbert [this message]
2025-05-11 11:55     ` Dr. David Alan Gilbert
2025-05-12 15:43       ` Alex Deucher
2025-05-12 22:53         ` Dr. David Alan Gilbert
2025-05-14  1:16           ` Dr. David Alan Gilbert
2025-04-18  0:21 ` [PATCH 3/4] drm/radeon: Remove unused radeon_fence_wait_any linux
2025-04-18  0:21 ` [PATCH 4/4] drm/amd/display: Remove unused *vbios_smu_set_dprefclk linux
2025-04-18 13:25   ` Alex Deucher

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=aApPnAA_QLYhNn71@gallifrey \
    --to=linux@treblig.org \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=sunpeng.li@amd.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.