예제 #1
0
static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
{
    struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);

    exynos_plane_dpms(exynos_crtc->plane, DRM_MODE_DPMS_OFF);
    exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
}
static void exynos_drm_crtc_commit(struct drm_crtc *crtc)
{
    struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);

    DRM_DEBUG_KMS("%s\n", __FILE__);

    /*
     * when set_crtc is requested from user or at booting time,
     * crtc->commit would be called without dpms call so if dpms is
     * no power on then crtc->dpms should be called
     * with DRM_MODE_DPMS_ON for the hardware power to be on.
     */
    if (exynos_crtc->dpms != DRM_MODE_DPMS_ON) {
        int mode = DRM_MODE_DPMS_ON;

        /*
         * enable hardware(power on) to all encoders hdmi connected
         * to current crtc.
         */
        exynos_drm_crtc_dpms(crtc, mode);
        /*
         * enable dma to all encoders connected to current crtc and
         * lcd panel.
         */
        exynos_drm_fn_encoder(crtc, &mode,
                              exynos_drm_encoder_dpms_from_crtc);
    }

    exynos_drm_fn_encoder(crtc, &exynos_crtc->pipe,
                          exynos_drm_encoder_crtc_commit);
}
static void exynos_drm_crtc_commit(struct drm_crtc *crtc)
{
	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);

	DRM_DEBUG_KMS("%s\n", __FILE__);

	/*
                                                            
                                                                
                                                
                                                          
  */
	if (exynos_crtc->dpms != DRM_MODE_DPMS_ON) {
		int mode = DRM_MODE_DPMS_ON;

		/*
                                                             
                     
   */
		exynos_drm_crtc_dpms(crtc, mode);
		/*
                                                             
               
   */
		exynos_drm_fn_encoder(crtc, &mode,
					exynos_drm_encoder_dpms_from_crtc);
	}

	exynos_drm_fn_encoder(crtc, &exynos_crtc->pipe,
			exynos_drm_encoder_crtc_commit);
}
예제 #4
0
static void exynos_drm_crtc_commit(struct drm_crtc *crtc)
{
    struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);

    exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_ON);
    exynos_plane_commit(exynos_crtc->plane);
    exynos_plane_dpms(exynos_crtc->plane, DRM_MODE_DPMS_ON);
}
예제 #5
0
static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
{
	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);

	DRM_DEBUG_KMS("%s\n", __FILE__);

	exynos_plane_dpms(exynos_crtc->plane, DRM_MODE_DPMS_OFF);
	exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
}
예제 #6
0
static int
exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
			  struct drm_display_mode *adjusted_mode, int x, int y,
			  struct drm_framebuffer *old_fb)
{
	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
	struct drm_plane *plane = exynos_crtc->plane;
	unsigned int crtc_w;
	unsigned int crtc_h;
	int pipe = exynos_crtc->pipe;
	int ret;

	DRM_DEBUG_KMS("%s\n", __FILE__);

	exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_ON);

	/*
	 * copy the mode data adjusted by mode_fixup() into crtc->mode
	 * so that hardware can be seet to proper mode.
	 */
	memcpy(&crtc->mode, adjusted_mode, sizeof(*adjusted_mode));

	crtc_w = crtc->fb->width - x;
	crtc_h = crtc->fb->height - y;

	ret = exynos_plane_mode_set(plane, crtc, crtc->fb, 0, 0, crtc_w, crtc_h,
				    x, y, crtc_w, crtc_h);
	if (ret)
		return ret;

	plane->crtc = crtc;
	plane->fb = crtc->fb;

	exynos_drm_fn_encoder(crtc, &pipe, exynos_drm_encoder_crtc_pipe);

	return 0;
}