Commit ef284b63 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Offset based on stride -> prevent weird unaligned resolution faults

parent 92018fb3
......@@ -2117,7 +2117,7 @@ void
trans_setup_framebuffer(struct panfrost_context *ctx, uint32_t *addr, int width, int height)
{
ctx->width = width;
ctx->height = height - 1;
ctx->height = height - 2;
ctx->bytes_per_pixel = 4; /* RGB32 */
ctx->has_alpha_channel = false;
ctx->flip_vertical = true; /* OpenGL */
......@@ -2130,7 +2130,7 @@ trans_setup_framebuffer(struct panfrost_context *ctx, uint32_t *addr, int width,
size_t framebuffer_sz = ctx->stride * ctx->height;
/* Unclear why framebuffers are offset like this */
int offset = (ctx->width - 256) * ctx->bytes_per_pixel;
int offset = (ctx->stride - 256) * ctx->bytes_per_pixel;
if (addr) {
ctx->framebuffer.cpu = (uint8_t *) addr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment