svn commit: r258262 - head/sys/dev/drm2
Konstantin Belousov
kostikbel at gmail.com
Sun Nov 17 17:46:08 UTC 2013
On Sun, Nov 17, 2013 at 04:07:53PM +0000, Jean-Sebastien Pedron wrote:
> Author: dumbbell
> Date: Sun Nov 17 16:07:52 2013
> New Revision: 258262
> URL: http://svnweb.freebsd.org/changeset/base/258262
>
> Log:
> drm: Support DRM_CAP_TIMESTAMP_MONOTONIC capability
>
> This fixes DPMS with KDE and radeonkms. Without this, the display would
> freeze when the monitor is put into sleep state, and only resumes after
> several dozens of minutes once the monitor is powered on again.
>
> Tested by: Mathias Picker <Mathias.Picker at virtual-earth.de>
>
> Modified:
> head/sys/dev/drm2/drm.h
> head/sys/dev/drm2/drmP.h
> head/sys/dev/drm2/drm_drv.c
> head/sys/dev/drm2/drm_ioctl.c
>
> Modified: head/sys/dev/drm2/drm.h
> ==============================================================================
> --- head/sys/dev/drm2/drm.h Sun Nov 17 15:58:13 2013 (r258261)
> +++ head/sys/dev/drm2/drm.h Sun Nov 17 16:07:52 2013 (r258262)
> @@ -1015,6 +1015,8 @@ struct drm_event_vblank {
> #define DRM_CAP_VBLANK_HIGH_CRTC 0x2
> #define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3
> #define DRM_CAP_DUMB_PREFER_SHADOW 0x4
> +#define DRM_CAP_PRIME 0x5
> +#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
>
> #include "drm_mode.h"
>
>
> Modified: head/sys/dev/drm2/drmP.h
> ==============================================================================
> --- head/sys/dev/drm2/drmP.h Sun Nov 17 15:58:13 2013 (r258261)
> +++ head/sys/dev/drm2/drmP.h Sun Nov 17 16:07:52 2013 (r258262)
> @@ -1067,6 +1067,7 @@ extern int drm_debug_flag;
> extern int drm_notyet_flag;
> extern unsigned int drm_vblank_offdelay;
> extern unsigned int drm_timestamp_precision;
> +extern unsigned int drm_timestamp_monotonic;
>
> /* Device setup support (drm_drv.c) */
> int drm_probe(device_t kdev, drm_pci_id_list_t *idlist);
>
> Modified: head/sys/dev/drm2/drm_drv.c
> ==============================================================================
> --- head/sys/dev/drm2/drm_drv.c Sun Nov 17 15:58:13 2013 (r258261)
> +++ head/sys/dev/drm2/drm_drv.c Sun Nov 17 16:07:52 2013 (r258262)
> @@ -56,6 +56,12 @@ int drm_notyet_flag = 0;
> unsigned int drm_vblank_offdelay = 5000; /* Default to 5000 msecs. */
> unsigned int drm_timestamp_precision = 20; /* Default to 20 usecs. */
>
> +/*
> + * Default to use monotonic timestamps for wait-for-vblank and page-flip
> + * complete events.
> + */
> +unsigned int drm_timestamp_monotonic = 1;
> +
Why do you need a variable there, instead of simply returning true
from the drm_getcap ? I do not see any way to change the value of the
drm_timestamp_monotonic.
> static int drm_load(struct drm_device *dev);
> static void drm_unload(struct drm_device *dev);
> static drm_pci_id_list_t *drm_find_description(int vendor, int device,
>
> Modified: head/sys/dev/drm2/drm_ioctl.c
> ==============================================================================
> --- head/sys/dev/drm2/drm_ioctl.c Sun Nov 17 15:58:13 2013 (r258261)
> +++ head/sys/dev/drm2/drm_ioctl.c Sun Nov 17 16:07:52 2013 (r258262)
> @@ -250,6 +250,9 @@ int drm_getcap(struct drm_device *dev, v
> case DRM_CAP_DUMB_PREFER_SHADOW:
> req->value = dev->mode_config.prefer_shadow;
> break;
> + case DRM_CAP_TIMESTAMP_MONOTONIC:
> + req->value = drm_timestamp_monotonic;
> + break;
> default:
> return EINVAL;
> }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20131117/d2fb4b4d/attachment.sig>
More information about the svn-src-head
mailing list