Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/drm drm: Respect is_console property o...
details: https://anonhg.NetBSD.org/src/rev/f581d0b407c9
branches: trunk
changeset: 361595:f581d0b407c9
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Feb 16 23:30:10 2022 +0000
description:
drm: Respect is_console property on main drm device, not fb child.
The MD device enumeration sets the property on, e.g., PCI devices --
not on drm framebuffer children, which are mostly a software
abstraction. Not sure examining the nouveaufb, intelfb, &c., device
properties is worthwhile at all, but in case it breaks something
let's just leave it in while we're fixing other things.
diffstat:
sys/external/bsd/drm2/drm/drmfb.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 2ff8d29a5142 -r f581d0b407c9 sys/external/bsd/drm2/drm/drmfb.c
--- a/sys/external/bsd/drm2/drm/drmfb.c Wed Feb 16 23:20:38 2022 +0000
+++ b/sys/external/bsd/drm2/drm/drmfb.c Wed Feb 16 23:30:10 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drmfb.c,v 1.12 2021/12/20 20:34:59 chs Exp $ */
+/* $NetBSD: drmfb.c,v 1.13 2022/02/16 23:30:10 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drmfb.c,v 1.12 2021/12/20 20:34:59 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drmfb.c,v 1.13 2022/02/16 23:30:10 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "vga.h"
@@ -93,6 +93,7 @@
static const struct genfb_ops zero_genfb_ops;
struct genfb_ops genfb_ops = zero_genfb_ops;
enum { CONS_VGA, CONS_GENFB, CONS_NONE } what_was_cons;
+ device_t parent = device_parent(da->da_dev);
bool is_console;
int error;
@@ -114,7 +115,9 @@
prop_dictionary_set_uint64(dict, "mode_callback",
(uint64_t)(uintptr_t)&drmfb_genfb_mode_callback);
- if (!prop_dictionary_get_bool(dict, "is_console", &is_console)) {
+ if (!prop_dictionary_get_bool(dict, "is_console", &is_console) &&
+ !prop_dictionary_get_bool(device_properties(parent), "is_console",
+ &is_console)) {
/* XXX Whattakludge! */
#if NVGA > 0
if ((da->da_params->dp_is_vga_console != NULL) &&
Home |
Main Index |
Thread Index |
Old Index