diff mbox

[4/8] drm/i915: Disable framebuffer compression for i915 driver in VM

Message ID 1411152428-7226-5-git-send-email-jike.song@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jike Song Sept. 19, 2014, 6:47 p.m. UTC
From: Yu Zhang <yu.c.zhang@intel.com>

Framebuffer compression is disabled when driver detects it's
running in XenGT VM, because XenGT does not provide emulations
for FBC related operations, and we do not expose stolen memory
to the VM.

Signed-off-by: Yu Zhang <yu.c.zhang@intel.com>
Signed-off-by: Jike Song <jike.song@intel.com>
Signed-off-by: Zhiyuan Lv <zhiyuan.lv@intel.com>
---
 drivers/gpu/drm/i915/i915_dma.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Chris Wilson Sept. 19, 2014, 8:07 a.m. UTC | #1
On Sat, Sep 20, 2014 at 02:47:04AM +0800, Jike Song wrote:
> From: Yu Zhang <yu.c.zhang@intel.com>
> 
> Framebuffer compression is disabled when driver detects it's
> running in XenGT VM, because XenGT does not provide emulations
> for FBC related operations, and we do not expose stolen memory
> to the VM.
> 
> Signed-off-by: Yu Zhang <yu.c.zhang@intel.com>
> Signed-off-by: Jike Song <jike.song@intel.com>
> Signed-off-by: Zhiyuan Lv <zhiyuan.lv@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_dma.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 927acea..bb4ad52 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1741,6 +1741,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>  
>  	i915_check_vgpu(dev);
>  
> +	/* disable framebuffer compression in vgt */
> +	if (intel_vgpu_active(dev))
> +		i915.enable_fbc = 0;

This should be done inside intel_enable_fbc() so that the correct reason
is given as to why it is disabled.
-Chris
Jike Song Sept. 22, 2014, 7:10 a.m. UTC | #2
On 09/19/2014 04:07 PM, Chris Wilson wrote:
> On Sat, Sep 20, 2014 at 02:47:04AM +0800, Jike Song wrote:
>> From: Yu Zhang <yu.c.zhang@intel.com>
>>
>> Framebuffer compression is disabled when driver detects it's
>> running in XenGT VM, because XenGT does not provide emulations
>> for FBC related operations, and we do not expose stolen memory
>> to the VM.
>>
>> Signed-off-by: Yu Zhang <yu.c.zhang@intel.com>
>> Signed-off-by: Jike Song <jike.song@intel.com>
>> Signed-off-by: Zhiyuan Lv <zhiyuan.lv@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_dma.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
>> index 927acea..bb4ad52 100644
>> --- a/drivers/gpu/drm/i915/i915_dma.c
>> +++ b/drivers/gpu/drm/i915/i915_dma.c
>> @@ -1741,6 +1741,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>>
>>   	i915_check_vgpu(dev);
>>
>> +	/* disable framebuffer compression in vgt */
>> +	if (intel_vgpu_active(dev))
>> +		i915.enable_fbc = 0;
>
> This should be done inside intel_enable_fbc() so that the correct reason
> is given as to why it is disabled.

I'm sorry, but do you mean intel_update_fbc()?


> -Chris
>

--
Thanks,
Jike
Chris Wilson Sept. 22, 2014, 11:28 a.m. UTC | #3
On Mon, Sep 22, 2014 at 03:10:05PM +0800, Jike Song wrote:
> On 09/19/2014 04:07 PM, Chris Wilson wrote:
> >This should be done inside intel_enable_fbc() so that the correct reason
> >is given as to why it is disabled.
> 
> I'm sorry, but do you mean intel_update_fbc()?

Yes. But don't let me stop you trying to bring sanity to the FBC code
either ;-)
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 927acea..bb4ad52 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1741,6 +1741,10 @@  int i915_driver_load(struct drm_device *dev, unsigned long flags)
 
 	i915_check_vgpu(dev);
 
+	/* disable framebuffer compression in vgt */
+	if (intel_vgpu_active(dev))
+		i915.enable_fbc = 0;
+
 	intel_irq_init(dev);
 	intel_uncore_sanitize(dev);