Hi tech@,
Add a handler for the WSDISPLAYIO_GINFO ioctl in inteldrm, allowing
to retrieve basic information about a framebuffer display.
When running wsconsctl on a machine with inteldrm support, this now
returns those additional fields:
display.width=1600
display.height=900
display.depth=32
Comments? OK?
Index: sys/dev/pci/drm/i915/i915_drv.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_drv.c,v
retrieving revision 1.101
diff -u -p -r1.101 i915_drv.c
--- sys/dev/pci/drm/i915/i915_drv.c 8 Jan 2017 12:11:54 -0000 1.101
+++ sys/dev/pci/drm/i915/i915_drv.c 17 Jun 2017 19:15:04 -0000
@@ -1037,11 +1037,20 @@ inteldrm_wsioctl(void *v, u_long cmd, ca
{
struct inteldrm_softc *dev_priv = v;
struct drm_device *dev = dev_priv->dev;
+ struct rasops_info *ri = &dev_priv->ro;
+ struct wsdisplay_fbinfo *wdf;
struct wsdisplay_param *dp = (struct wsdisplay_param *)data;
switch (cmd) {
case WSDISPLAYIO_GTYPE:
*(int *)data = WSDISPLAY_TYPE_INTELDRM;
+ return 0;
+ case WSDISPLAYIO_GINFO:
+ wdf = (struct wsdisplay_fbinfo *)data;
+ wdf->width = ri->ri_width;
+ wdf->height = ri->ri_height;
+ wdf->depth = ri->ri_depth;
+ wdf->cmsize = 0;
return 0;
case WSDISPLAYIO_GETPARAM:
if (ws_get_param && ws_get_param(dp) == 0)