Subversion Repositories Kolibri OS

Rev

Rev 1963 | Rev 3192 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1963 Rev 3031
Line 30... Line 30...
30
 * authorization from the copyright holder(s) and author(s).
30
 * authorization from the copyright holder(s) and author(s).
31
 */
31
 */
Line 32... Line 32...
32
 
32
 
33
#include 
33
#include 
34
#include 
34
#include 
35
#include "drmP.h"
35
#include 
36
#include "drm.h"
36
#include 
Line 37... Line 37...
37
#include "drm_crtc.h"
37
#include 
38
 
38
 
39
/**
39
/**
40
 * drm_mode_debug_printmodeline - debug print a mode
40
 * drm_mode_debug_printmodeline - debug print a mode
Line 683... Line 683...
683
			p->crtc_vdisplay /= 2;
683
			p->crtc_vdisplay /= 2;
684
			p->crtc_vsync_start /= 2;
684
			p->crtc_vsync_start /= 2;
685
			p->crtc_vsync_end /= 2;
685
			p->crtc_vsync_end /= 2;
686
			p->crtc_vtotal /= 2;
686
			p->crtc_vtotal /= 2;
687
		}
687
		}
688
 
-
 
689
		p->crtc_vtotal |= 1;
-
 
690
	}
688
	}
Line 691... Line 689...
691
 
689
 
692
	if (p->flags & DRM_MODE_FLAG_DBLSCAN) {
690
	if (p->flags & DRM_MODE_FLAG_DBLSCAN) {
693
		p->crtc_vdisplay *= 2;
691
		p->crtc_vdisplay *= 2;
Line 705... Line 703...
705
 
703
 
706
	p->crtc_vblank_start = min(p->crtc_vsync_start, p->crtc_vdisplay);
704
	p->crtc_vblank_start = min(p->crtc_vsync_start, p->crtc_vdisplay);
707
	p->crtc_vblank_end = max(p->crtc_vsync_end, p->crtc_vtotal);
705
	p->crtc_vblank_end = max(p->crtc_vsync_end, p->crtc_vtotal);
708
	p->crtc_hblank_start = min(p->crtc_hsync_start, p->crtc_hdisplay);
706
	p->crtc_hblank_start = min(p->crtc_hsync_start, p->crtc_hdisplay);
709
	p->crtc_hblank_end = max(p->crtc_hsync_end, p->crtc_htotal);
-
 
710
 
-
 
711
	p->crtc_hadjusted = false;
-
 
712
	p->crtc_vadjusted = false;
707
	p->crtc_hblank_end = max(p->crtc_hsync_end, p->crtc_htotal);
713
}
708
}
Line 714... Line 709...
714
EXPORT_SYMBOL(drm_mode_set_crtcinfo);
709
EXPORT_SYMBOL(drm_mode_set_crtcinfo);
-
 
710
 
-
 
711
 
-
 
712
/**
-
 
713
 * drm_mode_copy - copy the mode
-
 
714
 * @dst: mode to overwrite
-
 
715
 * @src: mode to copy
-
 
716
 *
-
 
717
 * LOCKING:
-
 
718
 * None.
-
 
719
 *
-
 
720
 * Copy an existing mode into another mode, preserving the object id
-
 
721
 * of the destination mode.
-
 
722
 */
-
 
723
void drm_mode_copy(struct drm_display_mode *dst, const struct drm_display_mode *src)
-
 
724
{
-
 
725
	int id = dst->base.id;
-
 
726
 
-
 
727
	*dst = *src;
-
 
728
	dst->base.id = id;
-
 
729
	INIT_LIST_HEAD(&dst->head);
-
 
730
}
715
 
731
EXPORT_SYMBOL(drm_mode_copy);
716
 
732
 
717
/**
733
/**
718
 * drm_mode_duplicate - allocate and duplicate an existing mode
734
 * drm_mode_duplicate - allocate and duplicate an existing mode
719
 * @m: mode to duplicate
735
 * @m: mode to duplicate
Line 726... Line 742...
726
 */
742
 */
727
struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev,
743
struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev,
728
					    const struct drm_display_mode *mode)
744
					    const struct drm_display_mode *mode)
729
{
745
{
730
	struct drm_display_mode *nmode;
746
	struct drm_display_mode *nmode;
731
	int new_id;
-
 
Line 732... Line 747...
732
 
747
 
733
	nmode = drm_mode_create(dev);
748
	nmode = drm_mode_create(dev);
734
	if (!nmode)
749
	if (!nmode)
Line 735... Line -...
735
		return NULL;
-
 
736
 
-
 
737
	new_id = nmode->base.id;
-
 
738
	*nmode = *mode;
750
		return NULL;
-
 
751
 
739
	nmode->base.id = new_id;
752
	drm_mode_copy(nmode, mode);
740
	INIT_LIST_HEAD(&nmode->head);
753
 
741
	return nmode;
754
	return nmode;
Line 742... Line 755...
742
}
755
}