> Date: Fri, 6 Jan 2017 12:42:13 +0100
> From: Frederic Cambus <f...@statdns.com>
> 
> Hi tech@,
> 
> Here's a diff to display color depth alongside resolution when attaching
> inteldrm and radeondrm, using the same scheme as efifb(4). This is the
> first step in trying to have all frame buffer drivers display resolution
> and depth the same way.
> 
> Tested only with inteldrm.
> 
> On this machine, it now displays: inteldrm0: 1600x900, 32bpp
> 
> Comments? OK?

ok kettenis@

> 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.100
> diff -u -p -r1.100 i915_drv.c
> --- sys/dev/pci/drm/i915/i915_drv.c   8 Apr 2016 08:27:53 -0000       1.100
> +++ sys/dev/pci/drm/i915/i915_drv.c   5 Jan 2017 21:45:13 -0000
> @@ -1508,8 +1508,8 @@ inteldrm_attach(struct device *parent, s
>               efifb_cndetach();
>  #endif
>  
> -     printf("%s: %dx%d\n", dev_priv->sc_dev.dv_xname,
> -         ri->ri_width, ri->ri_height);
> +     printf("%s: %dx%d, %dbpp\n", dev_priv->sc_dev.dv_xname,
> +         ri->ri_width, ri->ri_height, ri->ri_depth);
>  
>       intel_fbdev_restore_mode(dev);
>  
> Index: sys/dev/pci/drm/radeon/radeon_kms.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/drm/radeon/radeon_kms.c,v
> retrieving revision 1.48
> diff -u -p -r1.48 radeon_kms.c
> --- sys/dev/pci/drm/radeon/radeon_kms.c       8 Apr 2016 08:27:53 -0000       
> 1.48
> +++ sys/dev/pci/drm/radeon/radeon_kms.c       5 Jan 2017 21:45:13 -0000
> @@ -769,7 +769,8 @@ radeondrm_attachhook(struct device *self
>       radeon_vga_set_state(rdev, false);
>       pci_disable_legacy_vga(&rdev->dev);
>  
> -     printf("%s: %dx%d\n", rdev->dev.dv_xname, ri->ri_width, ri->ri_height);
> +     printf("%s: %dx%d, %dbpp\n", rdev->dev.dv_xname,
> +         ri->ri_width, ri->ri_height, ri->ri_depth);
>  
>       config_found_sm(&rdev->dev, &aa, wsemuldisplaydevprint,
>           wsemuldisplaydevsubmatch);
> 

Reply via email to