drm/i915: move psr_setup_done to psr struct
Subsystems (2)
PATCH 1/2 drm/i915: move psr_setup_done to psr struct
--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_dp.c | 6 +++--- drivers/gpu/drm/i915/intel_drv.h | 1 - 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -715,6 +715,7 @@ struct i915_fbc {struct i915_psr {bool sink_support;bool source_ok; +bool setup_done; };enum intel_pch {
drivers/gpu/drm/i915/intel_dp.c +3 -3
@@ -1567,7 +1567,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv = dev->dev_private;struct edp_vsc_psr psr_vsc; -if (intel_dp->psr_setup_done) +if (dev_priv->psr.setup_done)return ;/* Prepare VSC packet as per EDP 1.3 spec, Table 3.10 */
@@ -1582,7 +1582,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)I915_WRITE (EDP_PSR_DEBUG_CTL (dev),EDP_PSR_DEBUG_MASK_MEMUP |EDP_PSR_DEBUG_MASK_HPD |EDP_PSR_DEBUG_MASK_LPSP ); - intel_dp->psr_setup_done = true; + dev_priv->psr.setup_done = true; }static void intel_edp_psr_enable_sink (struct intel_dp *intel_dp)
@@ -3702,7 +3702,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,WARN (error,"intel_dp_i2c_init failed with error %d for port %c\n" , error,port_name (port)); - intel_dp->psr_setup_done = false; + dev_priv->psr.setup_done = false;if (!intel_edp_init_connector (intel_dp, intel_connector)) {i2c_del_adapter (&intel_dp->adapter);
drivers/gpu/drm/i915/intel_drv.h +0 -1
@@ -485,7 +485,6 @@ struct intel_dp {int backlight_off_delay;struct delayed_work panel_vdd_work;bool want_panel_vdd; -bool psr_setup_done;struct intel_connector *attached_connector; };
Signature · 1 line
1.8.3.1
PATCH 2/2 drm/i915: Add Baytrail PSR Support.
This patch adds PSR Support to Baytrail.
Baytrail cannot easily detect screen updates and force PSR exit. So we inactivate it on busy_ioctl and update to get it back on next display mark_idle.
The current issue with this implementation is the cursor updates. (Yet to be fixed).
--- drivers/gpu/drm/i915/i915_debugfs.c | 18 +++- drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/i915_gem.c | 3 + drivers/gpu/drm/i915/i915_reg.h | 34 ++++++++ drivers/gpu/drm/i915/intel_ddi.c | 3 +- drivers/gpu/drm/i915/intel_display.c | 3 + drivers/gpu/drm/i915/intel_dp.c | 156 +++++++++++++++++++++++++++++------ drivers/gpu/drm/i915/intel_drv.h | 1 + 8 files changed, 191 insertions(+), 31 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +14 -4
@@ -1816,6 +1816,7 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)struct drm_device *dev = node->minor->dev;struct drm_i915_private *dev_priv = dev->dev_private;u32 psrperf =0 ; +u32 psrstatus;bool enabled = false;intel_runtime_pm_get (dev_priv);
@@ -1823,14 +1824,23 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)seq_printf (m,"Sink_Support: %s\n" ,yesno (dev_priv->psr.sink_support));seq_printf (m,"Source_OK: %s\n" ,yesno (dev_priv->psr.source_ok)); - enabled =HAS_PSR (dev) && -I915_READ (EDP_PSR_CTL (dev)) &EDP_PSR_ENABLE ; +if (HAS_PSR (dev)) { +if (IS_VALLEYVIEW (dev)) { + psrstatus =I915_READ (VLV_EDP_PSR_STATUS_CTL ) & +VLV_EDP_PSR_CURR_STATE_MASK ; + enabled = ((psrstatus ==VLV_EDP_PSR_ACTIVE_NORFB_UP ) || + (psrstatus ==VLV_EDP_PSR_ACTIVE_SF_UPDATE )); + }else + enabled =I915_READ (EDP_PSR_CTL (dev)) &EDP_PSR_ENABLE ; + }seq_printf (m,"Enabled: %s\n" ,yesno (enabled)); -if (HAS_PSR (dev)) +/* VLV PSR has no kind of performance counter */ +if (HAS_PSR (dev) && !IS_VALLEYVIEW (dev)) { psrperf =I915_READ (EDP_PSR_PERF_CNT (dev)) &EDP_PSR_PERF_CNT_MASK ; -seq_printf (m,"Performance_Counter: %u\n" , psrperf); +seq_printf (m,"Performance_Counter: %u\n" , psrperf); + }intel_runtime_pm_put (dev_priv);return 0 ;
drivers/gpu/drm/i915/i915_drv.h +3 -1
@@ -716,6 +716,7 @@ struct i915_psr {bool sink_support;bool source_ok;bool setup_done; +bool inactive; };enum intel_pch {
@@ -1851,7 +1852,8 @@ struct drm_i915_file_private {#define HAS_DDI (dev) (INTEL_INFO(dev)->has_ddi)#define HAS_FPGA_DBG_UNCLAIMED (dev) (INTEL_INFO(dev)->has_fpga_dbg) -#define HAS_PSR (dev) (IS_HASWELL(dev) || IS_BROADWELL(dev)) +#define HAS_PSR (dev) (IS_HASWELL(dev) || IS_BROADWELL(dev) || \ + IS_VALLEYVIEW(dev))#define HAS_PC8 (dev) (IS_HASWELL(dev))/* XXX HSW:ULX */ #define HAS_RUNTIME_PM (dev) (IS_HASWELL(dev))
drivers/gpu/drm/i915/i915_gem.c +3 -0
@@ -4048,6 +4048,9 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,if (ret)return ret; +if (IS_VALLEYVIEW (dev)) +intel_edp_psr_inactivate (dev); + obj =to_intel_bo (drm_gem_object_lookup (dev, file, args->handle));if (&obj->base ==NULL ) { ret = -ENOENT ;
drivers/gpu/drm/i915/i915_reg.h +34 -0
@@ -1969,6 +1969,40 @@#define BCLRPAT (pipe) _PIPE(pipe, _BCLRPAT_A, _BCLRPAT_B)#define VSYNCSHIFT (trans) _TRANSCODER(trans, _VSYNCSHIFT_A, _VSYNCSHIFT_B) +/* VLV eDP PSR registers */ +#define VLV_EDP_PSR_CTL (VLV_DISPLAY_BASE + 0x60090) +#define VLV_EDP_PSR_ENABLE (1<<0) +#define VLV_EDP_PSR_RESET (1<<1) +#define VLV_EDP_PSR_MODE_MASK (7<<2) +#define VLV_EDP_PSR_MODE_HW_TIMER (1<<3) +#define VLV_EDP_PSR_MODE_SW_TIMER (1<<2) +#define VLV_EDP_PSR_SINGLE_FRAME_UPDATE (1<<7) +#define VLV_EDP_PSR_ACTIVE_ENTRY (1<<8) +#define VLV_EDP_PSR_SRC_TRANSMITTER_STATE (1<<9) +#define VLV_EDP_PSR_DBL_FRAME (1<<10) +#define VLV_EDP_PSR_FRAME_COUNT_MASK (0xff<<16) +#define VLV_EDP_PSR_IDLE_FRAME_SHIFT 16 +#define VLV_EDP_PSR_INT_TRANSITION (1<<24) + +#define VLV_PIPEA_VSC_SDP_REG (VLV_DISPLAY_BASE + 0x600a0) +#define VLV_EDP_PSR_SDP_FREQ_MASK (3<<30) +#define VLV_EDP_PSR_SDP_FREQ_ONCE (1<<31) +#define VLV_EDP_PSR_SDP_FREQ_EVFRAME (1<<30) + +#define VLV_EDP_PSR_STATUS_CTL (VLV_DISPLAY_BASE + 0x60094) +#define VLV_EDP_PSR_LAST_STATE_MASK (7<<3) +#define VLV_EDP_PSR_CURR_STATE_MASK 7 +#define VLV_EDP_PSR_DISABLED (0<<0) +#define VLV_EDP_PSR_INACTIVE (1<<0) +#define VLV_EDP_PSR_IN_TRANS_TO_ACTIVE (2<<0) +#define VLV_EDP_PSR_ACTIVE_NORFB_UP (3<<0) +#define VLV_EDP_PSR_ACTIVE_SF_UPDATE (4<<0) +#define VLV_EDP_PSR_EXIT (5<<0) +#define VLV_EDP_PSR_IN_TRANS (1<<7) + +#define VLV_PSR_CLK_GATE_DISABLE (VLV_DISPLAY_BASE + 0x6204) +#define VLV_CLK_DISABLE_PIPE_B (1<<30) +/* HSW+ eDP PSR registers */ #define EDP_PSR_BASE (dev) (IS_HASWELL(dev) ? 0x64800 : 0x6f800)#define EDP_PSR_CTL (dev) (EDP_PSR_BASE(dev) + 0)
drivers/gpu/drm/i915/intel_ddi.c +2 -1
@@ -1275,7 +1275,8 @@ static void intel_enable_ddi(struct intel_encoder *intel_encoder)intel_dp_stop_link_train (intel_dp);ironlake_edp_backlight_on (intel_dp); -intel_edp_psr_enable (intel_dp); +if (!IS_VALLEYVIEW (dev)) +intel_edp_psr_enable (intel_dp); }if (intel_crtc->eld_vld && type !=INTEL_OUTPUT_EDP ) {
drivers/gpu/drm/i915/intel_display.c +3 -0
@@ -8175,6 +8175,9 @@ void intel_mark_idle(struct drm_device *dev)if (dev_priv->info->gen >=6 )gen6_rps_idle (dev->dev_private); + +if (IS_VALLEYVIEW (dev)) +intel_edp_psr_update (dev); } void intel_mark_fb_busy(struct drm_i915_gem_object *obj,
drivers/gpu/drm/i915/intel_dp.c +131 -25
247 lines not on this page · raw message
drivers/gpu/drm/i915/intel_drv.h +1 -0
@@ -730,6 +730,7 @@ void ironlake_edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync);void intel_edp_psr_enable (struct intel_dp *intel_dp);void intel_edp_psr_disable (struct intel_dp *intel_dp);void intel_edp_psr_update (struct drm_device *dev); +void intel_edp_psr_inactivate (struct drm_device *dev);/* intel_dsi.c */
Signature · 1 line
1.8.3.1
2013/12/17 Rodrigo Vivi <[email protected]>:
Quoted 42 lines
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_dp.c | 6 +++--- drivers/gpu/drm/i915/intel_drv.h | 1 - 3 files changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -715,6 +715,7 @@ struct i915_fbc {struct i915_psr {bool sink_support;bool source_ok; +bool setup_done; };enum intel_pch {drivers/gpu/drm/i915/intel_dp.c +2
-2@@ -1567,7 +1567,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv = dev->dev_private;struct edp_vsc_psr psr_vsc; -if (intel_dp->psr_setup_done) +if (dev_priv->psr.setup_done)return ;/* Prepare VSC packet as per EDP 1.3 spec, Table 3.10 */ @@ -1582,7 +1582,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)I915_WRITE (EDP_PSR_DEBUG_CTL (dev),EDP_PSR_DEBUG_MASK_MEMUP |EDP_PSR_DEBUG_MASK_HPD |EDP_PSR_DEBUG_MASK_LPSP ); - intel_dp->psr_setup_done = true; + dev_priv->psr.setup_done = true; }static void intel_edp_psr_enable_sink (struct intel_dp *intel_dp)
drivers/gpu/drm/i915/intel_dp.c intel_dp_init_connector(struct intel_digital_port *intel_dig_port, · line 3705
Quoted 5 lines
drivers/gpu/drm/i915/intel_dp.c +1
-1@@ -3702,7 +3702,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,WARN (error,"intel_dp_i2c_init failed with error %d for port %c\n" , error,port_name (port)); - intel_dp->psr_setup_done = false; + dev_priv->psr.setup_done = false;
This line is now weird because most systems will call intel_dp_init_connector more than once, so we'll zero setup_done many times. I don't see any bugs related to this, but we should probably move this line to somewhere else. Or just remove this line and rely on the fact that the struct is initialized as zero when allocated. It seems sink_support and source_ok are not explicitly initialized, so we should probably follow this model.
Quoted 22 lines
drivers/gpu/drm/i915/intel_dp.c +0
-0if (!intel_edp_init_connector (intel_dp, intel_connector)) {i2c_del_adapter (&intel_dp->adapter);drivers/gpu/drm/i915/intel_drv.h +0
-2@@ -485,7 +485,6 @@ struct intel_dp {int backlight_off_delay;struct delayed_work panel_vdd_work;bool want_panel_vdd; -bool psr_setup_done;struct intel_connector *attached_connector; }; --1.8.3.1
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Paulo Zanoni
Quoted 46 lines · Paulo Zanoni
2013/12/17 Rodrigo Vivi <[email protected]>:
Quoted 45 lines
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_dp.c | 6 +++--- drivers/gpu/drm/i915/intel_drv.h | 1 - 3 files changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -715,6 +715,7 @@ struct i915_fbc {struct i915_psr {bool sink_support;bool source_ok; +bool setup_done; };enum intel_pch {drivers/gpu/drm/i915/intel_dp.c +2
-2@@ -1567,7 +1567,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv = dev->dev_private;struct edp_vsc_psr psr_vsc; -if (intel_dp->psr_setup_done) +if (dev_priv->psr.setup_done)return ;/* Prepare VSC packet as per EDP 1.3 spec, Table 3.10 */ @@ -1582,7 +1582,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)I915_WRITE (EDP_PSR_DEBUG_CTL (dev),EDP_PSR_DEBUG_MASK_MEMUP |EDP_PSR_DEBUG_MASK_HPD |EDP_PSR_DEBUG_MASK_LPSP ); - intel_dp->psr_setup_done = true; + dev_priv->psr.setup_done = true; }static void intel_edp_psr_enable_sink (struct intel_dp *intel_dp)@@ -3702,7 +3702,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,WARN (error,"intel_dp_i2c_init failed with error %d for port %c\n" , error,port_name (port));
Quoted 7 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_init_connector(struct intel_digital_port *intel_dig_port, · line 3705
Quoted 2 lines
drivers/gpu/drm/i915/intel_dp.c +1
-1- intel_dp->psr_setup_done = false; + dev_priv->psr.setup_done = false;This line is now weird because most systems will call
intel_dp_init_connectormore than once, so we'll zerosetup_donemany times. I don't see any bugs related to this, but we should probably move this line to somewhere else.
yeah, it isn't a problem... some of my tests here I was making it false on all disable call.
But it is better if it was only once for sure...
and I was using on dp_init what I guess doesn't help either, right? so, do you suggest any place?
Quoted 4 lines
Or just remove this line and rely on
the fact that the struct is initialized as zero when allocated. It seemssink_supportandsource_okare not explicitly initialized, so we should probably follow this model.
Can we trust that? If this is a sure thing I think this is might be the best approach.
Thanks!
Quoted 29 lines
Quoted 20 lines
drivers/gpu/drm/i915/intel_dp.c +0
-0if (!intel_edp_init_connector (intel_dp, intel_connector)) {i2c_del_adapter (&intel_dp->adapter);drivers/gpu/drm/i915/intel_drv.h +0
-2@@ -485,7 +485,6 @@ struct intel_dp {int backlight_off_delay;struct delayed_work panel_vdd_work;bool want_panel_vdd; -bool psr_setup_done;struct intel_connector *attached_connector; }; --1.8.3.1
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx--
Paulo Zanoni
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
PATCH 1/1 drm/i915: Add Baytrail PSR Support.
In reply to Rodrigo ViviThis patch adds PSR Support to Baytrail.
Baytrail cannot easily detect screen updates and force PSR exit. So we inactivate it on busy_ioctl and update to get it back on next display mark_idle.
v2: Also inactivate PSR on cursor update.
--- drivers/gpu/drm/i915/i915_debugfs.c | 18 +++- drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/i915_gem.c | 3 + drivers/gpu/drm/i915/i915_reg.h | 34 ++++++++ drivers/gpu/drm/i915/intel_ddi.c | 3 +- drivers/gpu/drm/i915/intel_display.c | 6 ++ drivers/gpu/drm/i915/intel_dp.c | 156 +++++++++++++++++++++++++++++------ drivers/gpu/drm/i915/intel_drv.h | 1 + 8 files changed, 194 insertions(+), 31 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +14 -4
@@ -1816,6 +1816,7 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)struct drm_device *dev = node->minor->dev;struct drm_i915_private *dev_priv = dev->dev_private;u32 psrperf =0 ; +u32 psrstatus;bool enabled = false;intel_runtime_pm_get (dev_priv);
@@ -1823,14 +1824,23 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)seq_printf (m,"Sink_Support: %s\n" ,yesno (dev_priv->psr.sink_support));seq_printf (m,"Source_OK: %s\n" ,yesno (dev_priv->psr.source_ok)); - enabled =HAS_PSR (dev) && -I915_READ (EDP_PSR_CTL (dev)) &EDP_PSR_ENABLE ; +if (HAS_PSR (dev)) { +if (IS_VALLEYVIEW (dev)) { + psrstatus =I915_READ (VLV_EDP_PSR_STATUS_CTL ) & +VLV_EDP_PSR_CURR_STATE_MASK ; + enabled = ((psrstatus ==VLV_EDP_PSR_ACTIVE_NORFB_UP ) || + (psrstatus ==VLV_EDP_PSR_ACTIVE_SF_UPDATE )); + }else + enabled =I915_READ (EDP_PSR_CTL (dev)) &EDP_PSR_ENABLE ; + }seq_printf (m,"Enabled: %s\n" ,yesno (enabled)); -if (HAS_PSR (dev)) +/* VLV PSR has no kind of performance counter */ +if (HAS_PSR (dev) && !IS_VALLEYVIEW (dev)) { psrperf =I915_READ (EDP_PSR_PERF_CNT (dev)) &EDP_PSR_PERF_CNT_MASK ; -seq_printf (m,"Performance_Counter: %u\n" , psrperf); +seq_printf (m,"Performance_Counter: %u\n" , psrperf); + }intel_runtime_pm_put (dev_priv);return 0 ;
drivers/gpu/drm/i915/i915_drv.h +3 -1
@@ -716,6 +716,7 @@ struct i915_psr {bool sink_support;bool source_ok;bool setup_done; +bool inactive; };enum intel_pch {
@@ -1851,7 +1852,8 @@ struct drm_i915_file_private {#define HAS_DDI (dev) (INTEL_INFO(dev)->has_ddi)#define HAS_FPGA_DBG_UNCLAIMED (dev) (INTEL_INFO(dev)->has_fpga_dbg) -#define HAS_PSR (dev) (IS_HASWELL(dev) || IS_BROADWELL(dev)) +#define HAS_PSR (dev) (IS_HASWELL(dev) || IS_BROADWELL(dev) || \ + IS_VALLEYVIEW(dev))#define HAS_PC8 (dev) (IS_HASWELL(dev))/* XXX HSW:ULX */ #define HAS_RUNTIME_PM (dev) (IS_HASWELL(dev))
drivers/gpu/drm/i915/i915_gem.c +3 -0
@@ -4048,6 +4048,9 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,if (ret)return ret; +if (IS_VALLEYVIEW (dev)) +intel_edp_psr_inactivate (dev); + obj =to_intel_bo (drm_gem_object_lookup (dev, file, args->handle));if (&obj->base ==NULL ) { ret = -ENOENT ;
drivers/gpu/drm/i915/i915_reg.h +34 -0
@@ -1969,6 +1969,40 @@#define BCLRPAT (pipe) _PIPE(pipe, _BCLRPAT_A, _BCLRPAT_B)#define VSYNCSHIFT (trans) _TRANSCODER(trans, _VSYNCSHIFT_A, _VSYNCSHIFT_B) +/* VLV eDP PSR registers */ +#define VLV_EDP_PSR_CTL (VLV_DISPLAY_BASE + 0x60090) +#define VLV_EDP_PSR_ENABLE (1<<0) +#define VLV_EDP_PSR_RESET (1<<1) +#define VLV_EDP_PSR_MODE_MASK (7<<2) +#define VLV_EDP_PSR_MODE_HW_TIMER (1<<3) +#define VLV_EDP_PSR_MODE_SW_TIMER (1<<2) +#define VLV_EDP_PSR_SINGLE_FRAME_UPDATE (1<<7) +#define VLV_EDP_PSR_ACTIVE_ENTRY (1<<8) +#define VLV_EDP_PSR_SRC_TRANSMITTER_STATE (1<<9) +#define VLV_EDP_PSR_DBL_FRAME (1<<10) +#define VLV_EDP_PSR_FRAME_COUNT_MASK (0xff<<16) +#define VLV_EDP_PSR_IDLE_FRAME_SHIFT 16 +#define VLV_EDP_PSR_INT_TRANSITION (1<<24) + +#define VLV_PIPEA_VSC_SDP_REG (VLV_DISPLAY_BASE + 0x600a0) +#define VLV_EDP_PSR_SDP_FREQ_MASK (3<<30) +#define VLV_EDP_PSR_SDP_FREQ_ONCE (1<<31) +#define VLV_EDP_PSR_SDP_FREQ_EVFRAME (1<<30) + +#define VLV_EDP_PSR_STATUS_CTL (VLV_DISPLAY_BASE + 0x60094) +#define VLV_EDP_PSR_LAST_STATE_MASK (7<<3) +#define VLV_EDP_PSR_CURR_STATE_MASK 7 +#define VLV_EDP_PSR_DISABLED (0<<0) +#define VLV_EDP_PSR_INACTIVE (1<<0) +#define VLV_EDP_PSR_IN_TRANS_TO_ACTIVE (2<<0) +#define VLV_EDP_PSR_ACTIVE_NORFB_UP (3<<0) +#define VLV_EDP_PSR_ACTIVE_SF_UPDATE (4<<0) +#define VLV_EDP_PSR_EXIT (5<<0) +#define VLV_EDP_PSR_IN_TRANS (1<<7) + +#define VLV_PSR_CLK_GATE_DISABLE (VLV_DISPLAY_BASE + 0x6204) +#define VLV_CLK_DISABLE_PIPE_B (1<<30) +/* HSW+ eDP PSR registers */ #define EDP_PSR_BASE (dev) (IS_HASWELL(dev) ? 0x64800 : 0x6f800)#define EDP_PSR_CTL (dev) (EDP_PSR_BASE(dev) + 0)
drivers/gpu/drm/i915/intel_ddi.c +2 -1
@@ -1275,7 +1275,8 @@ static void intel_enable_ddi(struct intel_encoder *intel_encoder)intel_dp_stop_link_train (intel_dp);ironlake_edp_backlight_on (intel_dp); -intel_edp_psr_enable (intel_dp); +if (!IS_VALLEYVIEW (dev)) +intel_edp_psr_enable (intel_dp); }if (intel_crtc->eld_vld && type !=INTEL_OUTPUT_EDP ) {
drivers/gpu/drm/i915/intel_display.c +6 -0
@@ -7460,6 +7460,9 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,u32 base =0 , pos =0 ;bool visible; +if (IS_VALLEYVIEW (dev)) +intel_edp_psr_inactivate (dev); +if (on) base = intel_crtc->cursor_addr;
@@ -8175,6 +8178,9 @@ void intel_mark_idle(struct drm_device *dev)if (dev_priv->info->gen >=6 )gen6_rps_idle (dev->dev_private); + +if (IS_VALLEYVIEW (dev)) +intel_edp_psr_update (dev); } void intel_mark_fb_busy(struct drm_i915_gem_object *obj,
drivers/gpu/drm/i915/intel_dp.c +131 -25
247 lines not on this page · raw message
drivers/gpu/drm/i915/intel_drv.h +1 -0
@@ -730,6 +730,7 @@ void ironlake_edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync);void intel_edp_psr_enable (struct intel_dp *intel_dp);void intel_edp_psr_disable (struct intel_dp *intel_dp);void intel_edp_psr_update (struct drm_device *dev); +void intel_edp_psr_inactivate (struct drm_device *dev);/* intel_dsi.c */
Signature · 1 line
1.8.3.1
Re: [PATCH] drm/i915: Add Baytrail PSR Support.
Quoted 5 lines · Rodrigo Vivi
This patch adds PSR Support to Baytrail.
Baytrail cannot easily detect screen updates and force PSR exit. So we inactivate it on
busy_ioctland update to get it back on next displaymark_idle.
That wasn't the plan, and certainly not every single busy ioctl. -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH] drm/i915: Add Baytrail PSR Support.
Quoted 8 lines · Chris Wilson
Quoted 5 lines · Rodrigo Vivi
This patch adds PSR Support to Baytrail.
Baytrail cannot easily detect screen updates and force PSR exit. So we inactivate it on
busy_ioctland update to get it back on next displaymark_idle.That wasn't the plan, and certainly not every single busy ioctl.
what do you suggest?
Quoted 1 line
-Chris
Thanks,
Rodrigo.
Quoted 3 lines
--
Chris Wilson, Intel Open Source Technology Centre
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Re: [PATCH] drm/i915: Add Baytrail PSR Support.
Quoted 11 lines · Rodrigo Vivi
Quoted 8 lines · Chris Wilson
Quoted 5 lines · Rodrigo Vivi
This patch adds PSR Support to Baytrail.
Baytrail cannot easily detect screen updates and force PSR exit. So we inactivate it on
busy_ioctland update to get it back on next displaymark_idle.That wasn't the plan, and certainly not every single busy ioctl.
what do you suggest?
also please notice that only the first one really inactivates the psr... the rest are ignored until next update/enable on mark_idle or on set_base.
Quoted 15 lines
Quoted 2 lines
-Chris
Thanks,
Rodrigo.Quoted 3 lines
--
Chris Wilson, Intel Open Source Technology Centre--
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Re: [PATCH] drm/i915: Add Baytrail PSR Support.
In reply to Rodrigo ViviQuoted 11 lines · Rodrigo Vivi
Quoted 8 lines · Chris Wilson
Quoted 5 lines · Rodrigo Vivi
This patch adds PSR Support to Baytrail.
Baytrail cannot easily detect screen updates and force PSR exit. So we inactivate it on
busy_ioctland update to get it back on next displaymark_idle.That wasn't the plan, and certainly not every single busy ioctl.
what do you suggest?
We proposed a mechansim for frontbuffer write detection. -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre