Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/sunxi Use helper to fill fb struct
details: https://anonhg.NetBSD.org/src/rev/68c7dc370a01
branches: trunk
changeset: 1028601:68c7dc370a01
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:25:17 2021 +0000
description:
Use helper to fill fb struct
Author: Maya Rashish <maya%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>
diffstat:
sys/arch/arm/sunxi/sunxi_drm.c | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diffs (35 lines):
diff -r 5c0a3a3b046c -r 68c7dc370a01 sys/arch/arm/sunxi/sunxi_drm.c
--- a/sys/arch/arm/sunxi/sunxi_drm.c Sun Dec 19 11:25:09 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_drm.c Sun Dec 19 11:25:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_drm.c,v 1.19 2021/12/19 11:25:09 riastradh Exp $ */
+/* $NetBSD: sunxi_drm.c,v 1.20 2021/12/19 11:25:17 riastradh Exp $ */
/*-
* Copyright (c) 2019 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.19 2021/12/19 11:25:09 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.20 2021/12/19 11:25:17 riastradh Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -266,15 +266,7 @@
fb = kmem_zalloc(sizeof(*fb), KM_SLEEP);
fb->obj = to_drm_gem_cma_obj(gem_obj);
- fb->base.pitches[0] = cmd->pitches[0];
- fb->base.pitches[1] = cmd->pitches[1];
- fb->base.pitches[2] = cmd->pitches[2];
- fb->base.offsets[0] = cmd->offsets[0];
- fb->base.offsets[1] = cmd->offsets[2];
- fb->base.offsets[2] = cmd->offsets[1];
- fb->base.width = cmd->width;
- fb->base.height = cmd->height;
- fb->base.format = drm_format_info(cmd->pixel_format);
+ drm_helper_mode_fill_fb_struct(ddev, &fb->base, cmd);
error = drm_framebuffer_init(ddev, &fb->base, &sunxi_drm_framebuffer_funcs);
if (error != 0)
Home |
Main Index |
Thread Index |
Old Index