On Tue, Dec 6, 2011 at 5:30 AM, Alan Cox <a...@lxorguk.ukuu.org.uk> wrote:
> On Mon,  5 Dec 2011 19:19:22 -0600
> Rob Clark <rob.cl...@linaro.org> wrote:
>
>> +     usergart = kzalloc(3 * sizeof(*usergart), GFP_KERNEL);
>> +
>> +     /* reserve 4k aligned/wide regions for userspace mappings: */
>> +     for (i = 0; i < ARRAY_SIZE(fmts); i++) {
>> +             uint16_t h = 1, w = PAGE_SIZE >> i;
>> +             tiler_align(fmts[i], &w, &h);
>> +             /* note: since each region is 1 4kb page wide, and minimum
>> +              * number of rows, the height ends up being the same as the
>> +              * # of pages in the region
>> +              */
>> +             usergart[i].height = h;
>> +             usergart[i].height_shift = ilog2(h);
>
> Seems to be missing anallocation failure check
>

oh, woops.. I've fixed that.. will give a couple more days to see if
there are any other comments and then send v2..

BR,
-R
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to