Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Alex Deucher <alexdeucher@gmail.com>,
	broonie@kernel.org, airlied@gmail.com,
	dri-devel@lists.freedesktop.org, alsa-devel@alsa-project.org
Cc: tiwai@suse.de, Chunming Zhou <david1.zhou@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	maruthi.bayyavarapu@amd.com, lgirdwood@gmail.com
Subject: Re: [PATCH 01/12] drm/amdgpu: add amd_gnb_bus support
Date: Thu, 06 Aug 2015 21:36:02 +0200	[thread overview]
Message-ID: <55C3B722.1010507@metafoo.de> (raw)
In-Reply-To: <1438871112-25946-2-git-send-email-alexander.deucher@amd.com>

> @@ -134,6 +136,7 @@ config DRM_AMDGPU
>  	select HWMON
>  	select BACKLIGHT_CLASS_DEVICE
>  	select INTERVAL_TREE
> +	select DRM_AMD_GNB_BUS

Here you select the symbol.

[...]

> +config DRM_AMD_GNB_BUS
> +	tristate "AMD GNB bus - used for GNB IPs such as ACP and ISP"

Here you make it user selectable. Use either or having both doesn't work too
well.

> +
> +endmenu
> diff --git a/drivers/gpu/drm/amd/bus/Makefile b/drivers/gpu/drm/amd/bus/Makefile
> new file mode 100644
> index 0000000..c41ffc9
> --- /dev/null
> +++ b/drivers/gpu/drm/amd/bus/Makefile
> @@ -0,0 +1,4 @@
> +#
> +ccflags-y := -Iinclude/drm -Idrivers/gpu/drm/amd/include/bus/
> +
> +obj-$(CONFIG_DRM_AMD_GNB_BUS) := amd_gnb_bus.o
> diff --git a/drivers/gpu/drm/amd/bus/amd_gnb_bus.c b/drivers/gpu/drm/amd/bus/amd_gnb_bus.c
> new file mode 100644
> index 0000000..071b16c
> --- /dev/null
> +++ b/drivers/gpu/drm/amd/bus/amd_gnb_bus.c
> @@ -0,0 +1,266 @@
[..]
> +#ifdef CONFIG_PM_SLEEP
> +static int amd_gnb_bus_legacy_suspend(struct device *dev, pm_message_t mesg)
> +{
> +	struct amd_gnb_bus_dev *amd_gnb_bus_dev = to_amd_gnb_bus_device(dev);
> +	struct amd_gnb_bus_driver *driver;
> +
> +	if (!amd_gnb_bus_dev || !dev->driver)
> +		return 0;
> +	driver = to_amd_gnb_bus_driver(dev->driver);
> +	if (!driver->suspend)
> +		return 0;
> +	return driver->suspend(amd_gnb_bus_dev, mesg);
> +}
> +
> +static int amd_gnb_bus_legacy_resume(struct device *dev)
> +{
> +	struct amd_gnb_bus_dev *amd_gnb_bus_dev = to_amd_gnb_bus_device(dev);
> +	struct amd_gnb_bus_driver *driver;
> +
> +	if (!amd_gnb_bus_dev || !dev->driver)
> +		return 0;
> +	driver = to_amd_gnb_bus_driver(dev->driver);
> +	if (!driver->resume)
> +		return 0;
> +	return driver->resume(amd_gnb_bus_dev);
> +}
[...]


Preferably don't add support for legacy suspend/resume to new subsystems.
Support for this is supposed to be removed from the kernel. Just use
dev_pm_ops and then you can drop all of the above since the PM core does the
right thing on its own for dev_pm_ops. No need to have support at the bus
level if there is nothing special to do at the bus level.

[...]

  reply	other threads:[~2015-08-06 19:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-06 14:25 [PATCH 00/12] Add ASoC support for AMD APUs Alex Deucher
2015-08-06 14:25 ` [PATCH 01/12] drm/amdgpu: add amd_gnb_bus support Alex Deucher
2015-08-06 19:36   ` Lars-Peter Clausen [this message]
2015-08-07 10:25   ` Mark Brown
2015-08-07 14:17     ` Alex Deucher
2015-08-07 16:16       ` Felix Kuehling
2015-08-07 18:24         ` Mark Brown
2015-08-07 20:03           ` Felix Kuehling
2015-08-10 11:56             ` Mark Brown
2015-08-07 17:20       ` Mark Brown
2015-08-06 14:25 ` [PATCH 02/12] drm/amd: remove amd gnb bus default runtime pm ops Alex Deucher
2015-08-06 14:25 ` [PATCH 04/12] drm/amd: add ACP driver support (v4) Alex Deucher
2015-08-06 14:25 ` [PATCH 05/12] drm/amd: modify ACP DMA buffer position update logic (v2) Alex Deucher
2015-08-06 14:25 ` [PATCH 06/12] drm/amd: add ACP suspend/resume functionality Alex Deucher
2015-08-06 14:25 ` [PATCH 07/12] drm/amd: change ACP SRAM banks used for audio Alex Deucher
2015-08-06 14:25 ` [PATCH 08/12] drm/amd: shutdown unused ACP SRAM memory banks Alex Deucher
2015-08-06 14:25 ` [PATCH 09/12] drm/amd: remove bitfield usage in ACP IP module Alex Deucher
2015-08-06 14:25 ` [PATCH 10/12] ASoC: AMD: add AMD ASoC ACP-I2S driver (v2) Alex Deucher
2015-08-06 19:22   ` Mark Brown
2015-08-07  9:27     ` Bayyavarapu, Maruthi
2015-08-06 14:25 ` [PATCH 11/12] ASoC: AMD: add suspend/resume for ACP PCM driver Alex Deucher
2015-08-06 19:23   ` Mark Brown
2015-08-06 14:25 ` [PATCH 12/12] ASoC: AMD: add ACP PCM driver runtime PM Alex Deucher
2015-08-06 19:26   ` Mark Brown
2015-08-07  9:41     ` Bayyavarapu, Maruthi

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=55C3B722.1010507@metafoo.de \
    --to=lars@metafoo.de \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=david1.zhou@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lgirdwood@gmail.com \
    --cc=maruthi.bayyavarapu@amd.com \
    --cc=tiwai@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox