32,9 → 32,9 |
|
#include <linux/list.h> |
#include <linux/list_sort.h> |
#include "drmP.h" |
#include "drm.h" |
#include "drm_crtc.h" |
#include <linux/export.h> |
#include <drm/drmP.h> |
#include <drm/drm_crtc.h> |
|
/** |
* drm_mode_debug_printmodeline - debug print a mode |
685,8 → 685,6 |
p->crtc_vsync_end /= 2; |
p->crtc_vtotal /= 2; |
} |
|
p->crtc_vtotal |= 1; |
} |
|
if (p->flags & DRM_MODE_FLAG_DBLSCAN) { |
707,14 → 705,32 |
p->crtc_vblank_end = max(p->crtc_vsync_end, p->crtc_vtotal); |
p->crtc_hblank_start = min(p->crtc_hsync_start, p->crtc_hdisplay); |
p->crtc_hblank_end = max(p->crtc_hsync_end, p->crtc_htotal); |
|
p->crtc_hadjusted = false; |
p->crtc_vadjusted = false; |
} |
EXPORT_SYMBOL(drm_mode_set_crtcinfo); |
|
|
/** |
* drm_mode_copy - copy the mode |
* @dst: mode to overwrite |
* @src: mode to copy |
* |
* LOCKING: |
* None. |
* |
* Copy an existing mode into another mode, preserving the object id |
* of the destination mode. |
*/ |
void drm_mode_copy(struct drm_display_mode *dst, const struct drm_display_mode *src) |
{ |
int id = dst->base.id; |
|
*dst = *src; |
dst->base.id = id; |
INIT_LIST_HEAD(&dst->head); |
} |
EXPORT_SYMBOL(drm_mode_copy); |
|
/** |
* drm_mode_duplicate - allocate and duplicate an existing mode |
* @m: mode to duplicate |
* |
728,16 → 744,13 |
const struct drm_display_mode *mode) |
{ |
struct drm_display_mode *nmode; |
int new_id; |
|
nmode = drm_mode_create(dev); |
if (!nmode) |
return NULL; |
|
new_id = nmode->base.id; |
*nmode = *mode; |
nmode->base.id = new_id; |
INIT_LIST_HEAD(&nmode->head); |
drm_mode_copy(nmode, mode); |
|
return nmode; |
} |
EXPORT_SYMBOL(drm_mode_duplicate); |