summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2024-11-06 07:09:46 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2024-11-06 07:09:46 +0000
commitda9b3d53b4d4d56b948d3ea89fb0ef52b29ac591 (patch)
tree699caec315753252dda7ac435ddc1e88da587e74 /sys/dev
parent0ebc339e1f52f30e02cef93221bf4593af517e9f (diff)
Make edid_parse() take a device name as extra argument so that the few
messages it may print are tied to the particular device it concerns.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/udl.c4
-rw-r--r--sys/dev/videomode/edid.c12
-rw-r--r--sys/dev/videomode/edidvar.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c
index 958b37d26c5..3c37156311e 100644
--- a/sys/dev/usb/udl.c
+++ b/sys/dev/usb/udl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udl.c,v 1.101 2024/11/02 15:00:26 miod Exp $ */
+/* $OpenBSD: udl.c,v 1.102 2024/11/06 07:09:45 miod Exp $ */
/*
* Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
@@ -2026,7 +2026,7 @@ udl_select_mode(struct udl_softc *sc)
int index = MAX_DL_MODES, i;
/* try to get the preferred mode from EDID */
- edid_parse(sc->sc_edid, &sc->sc_edid_info);
+ edid_parse(DN(sc), sc->sc_edid, &sc->sc_edid_info);
#if defined(UDL_DEBUG) && defined(EDID_DEBUG)
edid_print(&sc->sc_edid_info);
#endif
diff --git a/sys/dev/videomode/edid.c b/sys/dev/videomode/edid.c
index 711e8ae9a2d..d647b2f0bac 100644
--- a/sys/dev/videomode/edid.c
+++ b/sys/dev/videomode/edid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: edid.c,v 1.6 2024/11/02 15:00:26 miod Exp $ */
+/* $OpenBSD: edid.c,v 1.7 2024/11/06 07:09:45 miod Exp $ */
/* $NetBSD: edid.c,v 1.5 2007/03/07 19:56:40 macallan Exp $ */
/*-
@@ -485,7 +485,7 @@ edid_block(struct edid_info *edid, uint8_t *data)
* Gets EDID version in BCD, e.g. EDID v1.3 returned as 0x0103
*/
int
-edid_parse(uint8_t *data, struct edid_info *edid)
+edid_parse(const char *devname, uint8_t *data, struct edid_info *edid)
{
uint16_t manfid, estmodes;
const struct videomode *vmp;
@@ -560,8 +560,8 @@ edid_parse(uint8_t *data, struct edid_info *edid)
}
#ifdef DIAGNOSTIC
else
- printf("no data for est. mode %s\n",
- _edid_modes[i]);
+ printf("%s: no data for est. mode %s\n",
+ devname, _edid_modes[i]);
#endif
}
}
@@ -598,8 +598,8 @@ edid_parse(uint8_t *data, struct edid_info *edid)
if (edid->edid_modes[i].dot_clock > max_dotclock)
max_dotclock = edid->edid_modes[i].dot_clock;
- printf("max_dotclock according to supported modes: %d\n",
- max_dotclock);
+ printf("%s: max_dotclock according to supported modes: %d\n",
+ devname, max_dotclock);
mhz = (max_dotclock + 999) / 1000;
diff --git a/sys/dev/videomode/edidvar.h b/sys/dev/videomode/edidvar.h
index caf044cb6cf..e1b006f1fb1 100644
--- a/sys/dev/videomode/edidvar.h
+++ b/sys/dev/videomode/edidvar.h
@@ -87,7 +87,7 @@ struct edid_info {
};
int edid_is_valid(uint8_t *);
-int edid_parse(uint8_t *, struct edid_info *);
+int edid_parse(const char *, uint8_t *, struct edid_info *);
void edid_print(struct edid_info *);
#endif /* _DEV_VIDEOMODE_EDIDVAR_H */