> -----Original Message----- > From: amd-gfx [mailto:[email protected]] On Behalf > Of Shirish S > Sent: Wednesday, May 30, 2018 6:19 AM > To: [email protected]; Wentland, Harry > <[email protected]>; Zhu, Rex <[email protected]> > Cc: S, Shirish <[email protected]> > Subject: [PATCH] drm/amdgpu: avoid sleep while executing atombios table > > This patch replaces kzalloc's flag from GFP_KERNEL to GFP_ATOMIC to avoid > sleeping in atomic context. > > Signed-off-by: Shirish S <[email protected]>
Does this actually fix a bug or is it just to be safe. Do actually call atom command tables in an atomic context? Alex > --- > drivers/gpu/drm/amd/amdgpu/atom.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c > b/drivers/gpu/drm/amd/amdgpu/atom.c > index bfd98f0..da4558c 100644 > --- a/drivers/gpu/drm/amd/amdgpu/atom.c > +++ b/drivers/gpu/drm/amd/amdgpu/atom.c > @@ -1221,7 +1221,7 @@ static int > amdgpu_atom_execute_table_locked(struct atom_context *ctx, int index, > ectx.abort = false; > ectx.last_jump = 0; > if (ws) > - ectx.ws = kzalloc(4 * ws, GFP_KERNEL); > + ectx.ws = kzalloc(4 * ws, GFP_ATOMIC); > else > ectx.ws = NULL; > > -- > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
