[PATCH] drm/radeon/kms/blit: fix blit copy for very large buffers

2012-02-02 Thread Paul Menzel
Dear Ilija, Am Mittwoch, den 01.02.2012, 17:07 -0500 schrieb Ilija Hadzic: [?] > +#define I2F_MAX_BITS 15 > +#define I2F_MAX_INPUT ((2 << I2F_MAX_BITS) - 1) > +#define I2F_SHIFT (24 - I2F_MAX_BITS) > + > +/* > + * converts unsigned integer into 32-bit IEEE floating point representation; > + *

[PATCH] drm/radeon/kms/blit: fix blit copy for very large buffers

2012-02-02 Thread Michel Dänzer
On Mit, 2012-02-01 at 17:07 -0500, Ilija Hadzic wrote: > > diff --git a/drivers/gpu/drm/radeon/r600_blit_kms.c > b/drivers/gpu/drm/radeon/r600_blit_kms.c > index d996f43..32dcc95 100644 > --- a/drivers/gpu/drm/radeon/r600_blit_kms.c > +++ b/drivers/gpu/drm/radeon/r600_blit_kms.c > @@ -468,27 +46

[PATCH] drm/radeon/kms/blit: fix blit copy for very large buffers

2012-02-02 Thread Ilija Hadzic
On Thu, 2 Feb 2012, Michel [ISO-8859-1] D?nzer wrote: >> +#define I2F_MAX_BITS 15 >> +#define I2F_MAX_INPUT ((2 << I2F_MAX_BITS) - 1) > > Should be ((1 << I2F_MAX_BITS) - 1): 2^n == (1 << n) > Right. I'll fix it. > Use WARN_ON_ONCE here to avoid spamming the kernel output. If this is > ever

[PATCH] drm/radeon/kms/blit: fix blit copy for very large buffers

2012-02-02 Thread Ilija Hadzic
On Thu, 2 Feb 2012, Paul Menzel wrote: >> + * I2F_MAX_BITS can be increased, but that will add to loop iterations > > should that be t*w*o? > No, it's not "two" like the number but "to" like in "add to the group" or "add to the pile".

Re: [PATCH] drm/radeon/kms/blit: fix blit copy for very large buffers

2012-02-02 Thread Ilija Hadzic
On Thu, 2 Feb 2012, Michel [ISO-8859-1] D�nzer wrote: +#define I2F_MAX_BITS 15 +#define I2F_MAX_INPUT ((2 << I2F_MAX_BITS) - 1) Should be ((1 << I2F_MAX_BITS) - 1): 2^n == (1 << n) Right. I'll fix it. Use WARN_ON_ONCE here to avoid spamming the kernel output. If this is ever hit again

Re: [PATCH] drm/radeon/kms/blit: fix blit copy for very large buffers

2012-02-02 Thread Ilija Hadzic
On Thu, 2 Feb 2012, Paul Menzel wrote: + * I2F_MAX_BITS can be increased, but that will add to loop iterations should that be t*w*o? No, it's not "two" like the number but "to" like in "add to the group" or "add to the pile". ___ dri-devel mail

Re: [PATCH] drm/radeon/kms/blit: fix blit copy for very large buffers

2012-02-02 Thread Paul Menzel
Dear Ilija, Am Mittwoch, den 01.02.2012, 17:07 -0500 schrieb Ilija Hadzic: […] > +#define I2F_MAX_BITS 15 > +#define I2F_MAX_INPUT ((2 << I2F_MAX_BITS) - 1) > +#define I2F_SHIFT (24 - I2F_MAX_BITS) > + > +/* > + * converts unsigned integer into 32-bit IEEE floating point representation; > + *

Re: [PATCH] drm/radeon/kms/blit: fix blit copy for very large buffers

2012-02-02 Thread Michel Dänzer
On Mit, 2012-02-01 at 17:07 -0500, Ilija Hadzic wrote: > > diff --git a/drivers/gpu/drm/radeon/r600_blit_kms.c > b/drivers/gpu/drm/radeon/r600_blit_kms.c > index d996f43..32dcc95 100644 > --- a/drivers/gpu/drm/radeon/r600_blit_kms.c > +++ b/drivers/gpu/drm/radeon/r600_blit_kms.c > @@ -468,27 +46

[PATCH] drm/radeon/kms/blit: fix blit copy for very large buffers

2012-02-01 Thread Ilija Hadzic
Evergreen and NI blit copy was broken if the buffer maps to a rectangle whose one dimension is 16384 (max dimension allowed by these chips). In the mainline kernel, the problem is exposed only when buffers are very large (1G), but it's still a problem. The problem could be exposed for smaller buffe

[PATCH] drm/radeon/kms/blit: fix blit copy for very large buffers

2012-02-01 Thread Ilija Hadzic
Evergreen and NI blit copy was broken if the buffer maps to a rectangle whose one dimension is 16384 (max dimension allowed by these chips). In the mainline kernel, the problem is exposed only when buffers are very large (1G), but it's still a problem. The problem could be exposed for smaller buffe