2021-03-29 02:18:11

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the drm tree with Linus' tree

Hi all,

Today's linux-next merge of the drm tree got a conflict in:

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

between commits:

9adb125dde69 ("drm/amdgpu: re-enable suspend phase 2 for S0ix")
4021229e32bd ("drm/amdgpu/swsmu: skip gfx cgpg on s0ix suspend")
9bb735abcbd8 ("drm/amdgpu: update comments about s0ix suspend/resume")

from Linus' tree and commit:

e3c1b0712fdb ("drm/amdgpu: Reset the devices in the XGMI hive duirng probe")

from the drm tree.

I fixed it up (I think - see below) and can carry the fix as necessary.
This is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 8a5a8ff5d362,0f82c5d21237..000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@@ -2743,16 -2712,15 +2720,25 @@@ static int amdgpu_device_ip_suspend_pha
continue;
}

+ /* skip suspend of gfx and psp for S0ix
+ * gfx is in gfxoff state, so on resume it will exit gfxoff just
+ * like at runtime. PSP is also part of the always on hardware
+ * so no need to suspend it.
+ */
+ if (adev->in_s0ix &&
+ (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP ||
+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX))
+ continue;
+
+ /* skip unnecessary suspend if we do not initialize them yet */
+ if (adev->gmc.xgmi.pending_reset &&
+ !(adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC ||
+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SMC ||
+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON ||
+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH)) {
+ adev->ip_blocks[i].status.hw = false;
+ continue;
+ }
/* XXX handle errors */
r = adev->ip_blocks[i].version->funcs->suspend(adev);
/* XXX handle errors */


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-03-30 07:38:52

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: linux-next: manual merge of the drm tree with Linus' tree

Hi Stephen,

On Mon, Mar 29, 2021 at 4:16 AM Stephen Rothwell <[email protected]> wrote:
> Today's linux-next merge of the drm tree got a conflict in:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>
> between commits:
>
> 9adb125dde69 ("drm/amdgpu: re-enable suspend phase 2 for S0ix")
> 4021229e32bd ("drm/amdgpu/swsmu: skip gfx cgpg on s0ix suspend")
> 9bb735abcbd8 ("drm/amdgpu: update comments about s0ix suspend/resume")
>
> from Linus' tree and commit:
>
> e3c1b0712fdb ("drm/amdgpu: Reset the devices in the XGMI hive duirng probe")
>
> from the drm tree.
>
> I fixed it up (I think - see below) and can carry the fix as necessary.
> This is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 8a5a8ff5d362,0f82c5d21237..000000000000
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@@ -2743,16 -2712,15 +2720,25 @@@ static int amdgpu_device_ip_suspend_pha
> continue;
> }
>
> + /* skip suspend of gfx and psp for S0ix
> + * gfx is in gfxoff state, so on resume it will exit gfxoff just
> + * like at runtime. PSP is also part of the always on hardware
> + * so no need to suspend it.
> + */
> + if (adev->in_s0ix &&
> + (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP ||
> + adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX))
> + continue;
> +
> + /* skip unnecessary suspend if we do not initialize them yet */
> + if (adev->gmc.xgmi.pending_reset &&
> + !(adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC ||
> + adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SMC ||
> + adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON ||
> + adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH)) {
> + adev->ip_blocks[i].status.hw = false;
> + continue;
> + }
> /* XXX handle errors */
> r = adev->ip_blocks[i].version->funcs->suspend(adev);
> /* XXX handle errors */

The above is not what you have in next-20210329?
Your tree has a second copy of the first conflict block after the second:

/* skip suspend of gfx and psp for S0ix
[...]
/* skip unnecessary suspend if we do not initialize them yet */
[...]
/* skip suspend of gfx and psp for S0ix

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2021-03-30 23:43:26

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: manual merge of the drm tree with Linus' tree

Hi Geert,

On Tue, 30 Mar 2021 09:36:57 +0200 Geert Uytterhoeven <[email protected]> wrote:
>
> On Mon, Mar 29, 2021 at 4:16 AM Stephen Rothwell <[email protected]> wrote:
> > Today's linux-next merge of the drm tree got a conflict in:
> >
> > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> >
> > between commits:
> >
> > 9adb125dde69 ("drm/amdgpu: re-enable suspend phase 2 for S0ix")
> > 4021229e32bd ("drm/amdgpu/swsmu: skip gfx cgpg on s0ix suspend")
> > 9bb735abcbd8 ("drm/amdgpu: update comments about s0ix suspend/resume")
> >
> > from Linus' tree and commit:
> >
> > e3c1b0712fdb ("drm/amdgpu: Reset the devices in the XGMI hive duirng probe")
> >
> > from the drm tree.
> >
> > I fixed it up (I think - see below) and can carry the fix as necessary.
> > This is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging. You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> >
> > --
> > Cheers,
> > Stephen Rothwell
> >
> > diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 8a5a8ff5d362,0f82c5d21237..000000000000
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@@ -2743,16 -2712,15 +2720,25 @@@ static int amdgpu_device_ip_suspend_pha
> > continue;
> > }
> >
> > + /* skip suspend of gfx and psp for S0ix
> > + * gfx is in gfxoff state, so on resume it will exit gfxoff just
> > + * like at runtime. PSP is also part of the always on hardware
> > + * so no need to suspend it.
> > + */
> > + if (adev->in_s0ix &&
> > + (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP ||
> > + adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX))
> > + continue;
> > +
> > + /* skip unnecessary suspend if we do not initialize them yet */
> > + if (adev->gmc.xgmi.pending_reset &&
> > + !(adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC ||
> > + adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SMC ||
> > + adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON ||
> > + adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH)) {
> > + adev->ip_blocks[i].status.hw = false;
> > + continue;
> > + }
> > /* XXX handle errors */
> > r = adev->ip_blocks[i].version->funcs->suspend(adev);
> > /* XXX handle errors */
>
> The above is not what you have in next-20210329?
> Your tree has a second copy of the first conflict block after the second:
>
> /* skip suspend of gfx and psp for S0ix
> [...]
> /* skip unnecessary suspend if we do not initialize them yet */
> [...]
> /* skip suspend of gfx and psp for S0ix
>

It happened because those commits in Linus' tree are also (as different
commits) in the amdgpu tree and so git happily did a new merge
resolution and ended up with what you see :-( I'll see if I can fix it
up for today.

--
Cheers,
Stephen Rothwell