[PATCH 2/2] drm/omap: add GEM support for tiled/dmm buffers
Alan Cox
alan at lxorguk.ukuu.org.uk
Tue Dec 6 03:30:06 PST 2011
On Mon, 5 Dec 2011 19:19:22 -0600
Rob Clark <rob.clark at 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
More information about the dri-devel
mailing list