Lines Matching +full:edid +full:- +full:emulation

2  * Copyright(c) 2011-2016 Intel Corporation. All rights reserved.
49 int pipe = -1; in get_edp_pipe()
68 struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915; in edp_pipe_is_enabled()
80 struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915; in pipe_is_enabled()
82 if (drm_WARN_ON(&dev_priv->drm, in pipe_is_enabled()
84 return -EINVAL; in pipe_is_enabled()
97 /* EDID with 1024x768 as its resolution */
131 /* EDID with 1920x1200 as its resolution */
180 struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915; in emulate_monitor_status_change()
260 * 24 bpp, 4 lanes, 154000 pixel clk (from virtual EDID), in emulate_monitor_status_change()
261 * DP link clk 1620 MHz and non-constant_n. in emulate_monitor_status_change()
270 /* Enable per-DDI/PORT vreg */ in emulate_monitor_status_change()
397 * 24 bpp, 4 lanes, 154000 pixel clk (from virtual EDID), in emulate_monitor_status_change()
398 * DP link clk 1620 MHz and non-constant_n. in emulate_monitor_status_change()
523 kfree(port->edid); in clean_virtual_dp_monitor()
524 port->edid = NULL; in clean_virtual_dp_monitor()
526 kfree(port->dpcd); in clean_virtual_dp_monitor()
527 port->dpcd = NULL; in clean_virtual_dp_monitor()
538 /* Set vblank emulation request per-vGPU bit */ in vblank_timer_fn()
539 intel_gvt_request_service(vgpu->gvt, in vblank_timer_fn()
540 INTEL_GVT_REQUEST_EMULATE_VBLANK + vgpu->id); in vblank_timer_fn()
541 hrtimer_add_expires_ns(&vblank_timer->timer, vblank_timer->period); in vblank_timer_fn()
548 struct drm_i915_private *i915 = vgpu->gvt->gt->i915; in setup_virtual_dp_monitor()
550 struct intel_vgpu_vblank_timer *vblank_timer = &vgpu->vblank_timer; in setup_virtual_dp_monitor()
552 if (drm_WARN_ON(&i915->drm, resolution >= GVT_EDID_NUM)) in setup_virtual_dp_monitor()
553 return -EINVAL; in setup_virtual_dp_monitor()
555 port->edid = kzalloc(sizeof(*(port->edid)), GFP_KERNEL); in setup_virtual_dp_monitor()
556 if (!port->edid) in setup_virtual_dp_monitor()
557 return -ENOMEM; in setup_virtual_dp_monitor()
559 port->dpcd = kzalloc(sizeof(*(port->dpcd)), GFP_KERNEL); in setup_virtual_dp_monitor()
560 if (!port->dpcd) { in setup_virtual_dp_monitor()
561 kfree(port->edid); in setup_virtual_dp_monitor()
562 return -ENOMEM; in setup_virtual_dp_monitor()
565 memcpy(port->edid->edid_block, virtual_dp_monitor_edid[resolution], in setup_virtual_dp_monitor()
567 port->edid->data_valid = true; in setup_virtual_dp_monitor()
569 memcpy(port->dpcd->data, dpcd_fix_data, DPCD_HEADER_SIZE); in setup_virtual_dp_monitor()
570 port->dpcd->data_valid = true; in setup_virtual_dp_monitor()
571 port->dpcd->data[DPCD_SINK_COUNT] = 0x1; in setup_virtual_dp_monitor()
572 port->type = type; in setup_virtual_dp_monitor()
573 port->id = resolution; in setup_virtual_dp_monitor()
574 port->vrefresh_k = GVT_DEFAULT_REFRESH_RATE * MSEC_PER_SEC; in setup_virtual_dp_monitor()
575 vgpu->display.port_num = port_num; in setup_virtual_dp_monitor()
578 hrtimer_init(&vblank_timer->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); in setup_virtual_dp_monitor()
579 vblank_timer->timer.function = vblank_timer_fn; in setup_virtual_dp_monitor()
580 vblank_timer->vrefresh_k = port->vrefresh_k; in setup_virtual_dp_monitor()
581 …vblank_timer->period = DIV64_U64_ROUND_CLOSEST(NSEC_PER_SEC * MSEC_PER_SEC, vblank_timer->vrefresh… in setup_virtual_dp_monitor()
589 * vgpu_update_vblank_emulation - Update per-vGPU vblank_timer
593 * This function is used to turn on/off or update the per-vGPU vblank_timer
600 struct intel_vgpu_vblank_timer *vblank_timer = &vgpu->vblank_timer; in vgpu_update_vblank_emulation()
602 intel_vgpu_port(vgpu, vgpu->display.port_num); in vgpu_update_vblank_emulation()
606 * Skip the re-enable if already active and vrefresh unchanged. in vgpu_update_vblank_emulation()
610 if (vblank_timer->vrefresh_k != port->vrefresh_k || in vgpu_update_vblank_emulation()
611 !hrtimer_active(&vblank_timer->timer)) { in vgpu_update_vblank_emulation()
613 if (hrtimer_active(&vblank_timer->timer)) in vgpu_update_vblank_emulation()
614 hrtimer_cancel(&vblank_timer->timer); in vgpu_update_vblank_emulation()
617 vblank_timer->vrefresh_k = port->vrefresh_k; in vgpu_update_vblank_emulation()
618 …vblank_timer->period = DIV64_U64_ROUND_CLOSEST(NSEC_PER_SEC * MSEC_PER_SEC, vblank_timer->vrefresh… in vgpu_update_vblank_emulation()
619 hrtimer_start(&vblank_timer->timer, in vgpu_update_vblank_emulation()
620 ktime_add_ns(ktime_get(), vblank_timer->period), in vgpu_update_vblank_emulation()
625 hrtimer_cancel(&vblank_timer->timer); in vgpu_update_vblank_emulation()
631 struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915; in emulate_vblank_on_pipe()
632 struct intel_vgpu_irq *irq = &vgpu->irq; in emulate_vblank_on_pipe()
643 for_each_set_bit(event, irq->flip_done_event[pipe], in emulate_vblank_on_pipe()
645 clear_bit(event, irq->flip_done_event[pipe]); in emulate_vblank_on_pipe()
662 mutex_lock(&vgpu->vgpu_lock); in intel_vgpu_emulate_vblank()
663 for_each_pipe(vgpu->gvt->gt->i915, pipe) in intel_vgpu_emulate_vblank()
665 mutex_unlock(&vgpu->vgpu_lock); in intel_vgpu_emulate_vblank()
669 * intel_vgpu_emulate_hotplug - trigger hotplug event for vGPU
678 struct drm_i915_private *i915 = vgpu->gvt->gt->i915; in intel_vgpu_emulate_hotplug()
759 * intel_vgpu_clean_display - clean vGPU virtual display emulation
762 * This function is used to clean vGPU virtual display emulation stuffs
767 struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915; in intel_vgpu_clean_display()
781 * intel_vgpu_init_display- initialize vGPU virtual display emulation
785 * This function is used to initialize vGPU virtual display emulation stuffs
793 struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915; in intel_vgpu_init_display()
809 * intel_vgpu_reset_display- reset vGPU virtual display emulation
812 * This function is used to reset vGPU virtual display emulation stuffs