[PATCH 12/17] drm/mgag200: Move TAGFIFO reset into separate function

Sam Ravnborg sam at ravnborg.org
Mon May 4 14:29:07 UTC 2020


Hi Thomas.

> > 
> > 
> >> +	WREG_SEQ(0x01, seq1);
> >> +
> >> +	memctl = RREG32(MGAREG_MEMCTL);
> >> +
> >> +	memctl |= RESET_FLAG;
> >> +	WREG32(MGAREG_MEMCTL, memctl);
> >> +
> >> +	udelay(1000);
> >> +
> >> +	memctl &= ~RESET_FLAG;
> >> +	WREG32(MGAREG_MEMCTL, memctl);
> >> +
> >> +	/* screen on */
> >> +	RREG_SEQ(0x01, seq1);
> >> +	seq1 &= ~0x20;
> >> +	WREG_SEQ(0x01, seq1);
> > Here seq1 is read again, the old code used the old value.
> > I think new code is better.
> 
> You mean 'the old code was better,' right?
Well, if there is no good reason to change it stick with the old code we
know works.

I was not sure what would happen with the register when reset
was performed. So maybe reading back would be better, hence my comment.
But re-using the old value gives full control of the register.
So yeah, old code was better.

	Sam


More information about the dri-devel mailing list