Martin Peres
2016-Mar-01 21:36 UTC
[Nouveau] [PATCH 4/4] pmu/fuc: movw is somewhat weird on gk208, use mov instead
On 26/02/16 17:19, Karol Herbst wrote:> currently there is no change, because nobody uses those macros yet, but they > shouldn't stay broken > > Signed-off-by: Karol Herbst <nouveau at karolherbst.de> > --- > drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc > index 0d5cbeb..bb59eb4 100644 > --- a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc > +++ b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc > @@ -252,12 +252,12 @@ > #endif > > #define st(size, addr, reg) /* > -*/ movw $r0 addr /* > +*/ mov $r0 addr /*First of all, I know it is annoying, but we *need* to understand exactly what movw is now doing. Secondly, I seem to remember that a 32 bit mov was not added until fuc3 or something. Have you tried assembling this code on older fuc versions? Pretty sure it will fail.> */ st size D[$r0] reg /* > */ clear b32 $r0 > > #define ld(size, reg, addr) /* > -*/ movw $r0 addr /* > +*/ mov $r0 addr /* > */ ld size reg D[$r0] /* > */ clear b32 $r0 >
Ilia Mirkin
2016-Mar-01 21:38 UTC
[Nouveau] [PATCH 4/4] pmu/fuc: movw is somewhat weird on gk208, use mov instead
On Tue, Mar 1, 2016 at 4:36 PM, Martin Peres <martin.peres at free.fr> wrote:> On 26/02/16 17:19, Karol Herbst wrote: >> >> currently there is no change, because nobody uses those macros yet, but >> they >> shouldn't stay broken >> >> Signed-off-by: Karol Herbst <nouveau at karolherbst.de> >> --- >> drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc >> b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc >> index 0d5cbeb..bb59eb4 100644 >> --- a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc >> +++ b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc >> @@ -252,12 +252,12 @@ >> #endif >> #define st(size, addr, reg) /* >> -*/ movw $r0 addr /* >> +*/ mov $r0 addr /* > > > First of all, I know it is annoying, but we *need* to understand exactly > what movw is now doing. > > Secondly, I seem to remember that a 32 bit mov was not added until fuc3 orfuc5> something. Have you tried assembling this code on older fuc versions? Pretty > sure it will fail.That's what the imm32() macro is for.> >> */ st size D[$r0] reg /* >> */ clear b32 $r0 >> #define ld(size, reg, addr) /* >> -*/ movw $r0 addr /* >> +*/ mov $r0 addr /* >> */ ld size reg D[$r0] /* >> */ clear b32 $r0 >> > > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau
Martin Peres
2016-Mar-01 21:46 UTC
[Nouveau] [PATCH 4/4] pmu/fuc: movw is somewhat weird on gk208, use mov instead
On 01/03/16 23:38, Ilia Mirkin wrote:> On Tue, Mar 1, 2016 at 4:36 PM, Martin Peres <martin.peres at free.fr> wrote: >> On 26/02/16 17:19, Karol Herbst wrote: >>> currently there is no change, because nobody uses those macros yet, but >>> they >>> shouldn't stay broken >>> >>> Signed-off-by: Karol Herbst <nouveau at karolherbst.de> >>> --- >>> drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc >>> b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc >>> index 0d5cbeb..bb59eb4 100644 >>> --- a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc >>> +++ b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc >>> @@ -252,12 +252,12 @@ >>> #endif >>> #define st(size, addr, reg) /* >>> -*/ movw $r0 addr /* >>> +*/ mov $r0 addr /* >> >> First of all, I know it is annoying, but we *need* to understand exactly >> what movw is now doing. >> >> Secondly, I seem to remember that a 32 bit mov was not added until fuc3 or > fuc5Ah, right, fuc3 was on the GT2xx. Thanks!> >> something. Have you tried assembling this code on older fuc versions? Pretty >> sure it will fail. > That's what the imm32() macro is for.Right, with the mov replace with the imm32 macro, this patch will have my R-b!
Possibly Parallel Threads
- [PATCH 4/4] pmu/fuc: movw is somewhat weird on gk208, use mov instead
- [PATCH 4/4] pmu/fuc: movw is somewhat weird on gk208, use mov instead
- [PATCH 4/4] pmu/fuc: movw is somewhat weird on gk208, use mov instead
- [PATCH] pmu/fuc: don't use movw directly anymore
- [PATCH] pmu/fuc: don't use movw directly anymore