diff mbox

drm/i915: fix the issue DP-1 not working in guest

Message ID 1519108842-185379-1-git-send-email-mustamin.b.mustaffa@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mustamin B Mustaffa Feb. 20, 2018, 6:40 a.m. UTC
In GVT guest, when port A is DP, i915 will force it as an EDP panel,
which
will cause DP-1 not working in GVT guest.
This patch fixed this issue by check intel_vgpu_active() in
intel_ddi_compute_config().

Signed-off-by: Min He <min.he@intel.com>
Signed-off-by: Nuhairi Anuar <nuhairi.anuar@intel.com>
Signed-off-by: Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jani Nikula Feb. 20, 2018, 11:35 a.m. UTC | #1
On Tue, 20 Feb 2018, Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com> wrote:
> In GVT guest, when port A is DP, i915 will force it as an EDP panel,
> which
> will cause DP-1 not working in GVT guest.
> This patch fixed this issue by check intel_vgpu_active() in
> intel_ddi_compute_config().

Just repeating Ville's question from last June that went unanswered [1],
"And why exactly are you trying to register DP on port A?"

BR,
Jani.

[1] http://mid.mail-archive.com/20170614133842.GM12629@intel.com

>
> Signed-off-by: Min He <min.he@intel.com>
> Signed-off-by: Nuhairi Anuar <nuhairi.anuar@intel.com>
> Signed-off-by: Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index db92a26..9f5e85c 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -2720,7 +2720,7 @@ static bool intel_ddi_compute_config(struct intel_encoder *encoder,
>  	enum port port = encoder->port;
>  	int ret;
>  
> -	if (port == PORT_A)
> +	if (port == PORT_A && !intel_vgpu_active(dev_priv))
>  		pipe_config->cpu_transcoder = TRANSCODER_EDP;
>  
>  	if (intel_crtc_has_type(pipe_config, INTEL_OUTPUT_HDMI))
Mustamin B Mustaffa Feb. 21, 2018, 12:01 a.m. UTC | #2
Hi Jani, 

In GVT (virtualization) environment, it only can use DP.  Therefore, we want to enable Port A as DP so that display panel on Port A can be used by GVT. 

Best regard 

Mustamin


-----Original Message-----
From: Jani Nikula [mailto:jani.nikula@linux.intel.com] 
Sent: Tuesday, February 20, 2018 7:35 PM
To: Mustaffa, Mustamin B <mustamin.b.mustaffa@intel.com>; intel-gfx@lists.freedesktop.org
Cc: Mustaffa, Mustamin B <mustamin.b.mustaffa@intel.com>; Anuar, Nuhairi <nuhairi.anuar@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix the issue DP-1 not working in guest

On Tue, 20 Feb 2018, Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com> wrote:
> In GVT guest, when port A is DP, i915 will force it as an EDP panel, 
> which will cause DP-1 not working in GVT guest.
> This patch fixed this issue by check intel_vgpu_active() in 
> intel_ddi_compute_config().

Just repeating Ville's question from last June that went unanswered [1], "And why exactly are you trying to register DP on port A?"

BR,
Jani.

[1] http://mid.mail-archive.com/20170614133842.GM12629@intel.com

>
> Signed-off-by: Min He <min.he@intel.com>
> Signed-off-by: Nuhairi Anuar <nuhairi.anuar@intel.com>
> Signed-off-by: Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c 
> b/drivers/gpu/drm/i915/intel_ddi.c
> index db92a26..9f5e85c 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -2720,7 +2720,7 @@ static bool intel_ddi_compute_config(struct intel_encoder *encoder,
>  	enum port port = encoder->port;
>  	int ret;
>  
> -	if (port == PORT_A)
> +	if (port == PORT_A && !intel_vgpu_active(dev_priv))
>  		pipe_config->cpu_transcoder = TRANSCODER_EDP;
>  
>  	if (intel_crtc_has_type(pipe_config, INTEL_OUTPUT_HDMI))

--
Jani Nikula, Intel Open Source Technology Center
Jani Nikula Feb. 21, 2018, 8:03 a.m. UTC | #3
On Wed, 21 Feb 2018, "Mustaffa, Mustamin B" <mustamin.b.mustaffa@intel.com> wrote:
> Hi Jani, 
>
> In GVT (virtualization) environment, it only can use DP.  Therefore,
> we want to enable Port A as DP so that display panel on Port A can be
> used by GVT.

Why not just disable port A in the guest VBT?

Or are you saying that host eDP can't be used by guest unless we fake
the same port as DP? Or what are you trying to say?


BR,
Jani.


>
> Best regard 
>
> Mustamin
>
>
> -----Original Message-----
> From: Jani Nikula [mailto:jani.nikula@linux.intel.com] 
> Sent: Tuesday, February 20, 2018 7:35 PM
> To: Mustaffa, Mustamin B <mustamin.b.mustaffa@intel.com>; intel-gfx@lists.freedesktop.org
> Cc: Mustaffa, Mustamin B <mustamin.b.mustaffa@intel.com>; Anuar, Nuhairi <nuhairi.anuar@intel.com>
> Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix the issue DP-1 not working in guest
>
> On Tue, 20 Feb 2018, Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com> wrote:
>> In GVT guest, when port A is DP, i915 will force it as an EDP panel, 
>> which will cause DP-1 not working in GVT guest.
>> This patch fixed this issue by check intel_vgpu_active() in 
>> intel_ddi_compute_config().
>
> Just repeating Ville's question from last June that went unanswered [1], "And why exactly are you trying to register DP on port A?"
>
> BR,
> Jani.
>
> [1] http://mid.mail-archive.com/20170614133842.GM12629@intel.com
>
>>
>> Signed-off-by: Min He <min.he@intel.com>
>> Signed-off-by: Nuhairi Anuar <nuhairi.anuar@intel.com>
>> Signed-off-by: Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_ddi.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_ddi.c 
>> b/drivers/gpu/drm/i915/intel_ddi.c
>> index db92a26..9f5e85c 100644
>> --- a/drivers/gpu/drm/i915/intel_ddi.c
>> +++ b/drivers/gpu/drm/i915/intel_ddi.c
>> @@ -2720,7 +2720,7 @@ static bool intel_ddi_compute_config(struct intel_encoder *encoder,
>>  	enum port port = encoder->port;
>>  	int ret;
>>  
>> -	if (port == PORT_A)
>> +	if (port == PORT_A && !intel_vgpu_active(dev_priv))
>>  		pipe_config->cpu_transcoder = TRANSCODER_EDP;
>>  
>>  	if (intel_crtc_has_type(pipe_config, INTEL_OUTPUT_HDMI))
>
> --
> Jani Nikula, Intel Open Source Technology Center
Mustamin B Mustaffa Feb. 21, 2018, 8:21 a.m. UTC | #4
Hi Jani, 

We cannot disable any port as we might use all the ports for display. 
And yes, we fake the DP to use EDP panel. 

Hi Nuhairi, please correct me if I'm wrong. 

Best regard 

Mustamin


-----Original Message-----
From: Jani Nikula [mailto:jani.nikula@linux.intel.com] 
Sent: Wednesday, February 21, 2018 4:03 PM
To: Mustaffa, Mustamin B <mustamin.b.mustaffa@intel.com>; intel-gfx@lists.freedesktop.org
Cc: Anuar, Nuhairi <nuhairi.anuar@intel.com>; Ville Syrjälä <ville.syrjala@linux.intel.com>
Subject: RE: [Intel-gfx] [PATCH] drm/i915: fix the issue DP-1 not working in guest

On Wed, 21 Feb 2018, "Mustaffa, Mustamin B" <mustamin.b.mustaffa@intel.com> wrote:
> Hi Jani,
>
> In GVT (virtualization) environment, it only can use DP.  Therefore, 
> we want to enable Port A as DP so that display panel on Port A can be 
> used by GVT.

Why not just disable port A in the guest VBT?

Or are you saying that host eDP can't be used by guest unless we fake the same port as DP? Or what are you trying to say?


BR,
Jani.


>
> Best regard
>
> Mustamin
>
>
> -----Original Message-----
> From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
> Sent: Tuesday, February 20, 2018 7:35 PM
> To: Mustaffa, Mustamin B <mustamin.b.mustaffa@intel.com>; 
> intel-gfx@lists.freedesktop.org
> Cc: Mustaffa, Mustamin B <mustamin.b.mustaffa@intel.com>; Anuar, 
> Nuhairi <nuhairi.anuar@intel.com>
> Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix the issue DP-1 not 
> working in guest
>
> On Tue, 20 Feb 2018, Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com> wrote:
>> In GVT guest, when port A is DP, i915 will force it as an EDP panel, 
>> which will cause DP-1 not working in GVT guest.
>> This patch fixed this issue by check intel_vgpu_active() in 
>> intel_ddi_compute_config().
>
> Just repeating Ville's question from last June that went unanswered [1], "And why exactly are you trying to register DP on port A?"
>
> BR,
> Jani.
>
> [1] http://mid.mail-archive.com/20170614133842.GM12629@intel.com
>
>>
>> Signed-off-by: Min He <min.he@intel.com>
>> Signed-off-by: Nuhairi Anuar <nuhairi.anuar@intel.com>
>> Signed-off-by: Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_ddi.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_ddi.c
>> b/drivers/gpu/drm/i915/intel_ddi.c
>> index db92a26..9f5e85c 100644
>> --- a/drivers/gpu/drm/i915/intel_ddi.c
>> +++ b/drivers/gpu/drm/i915/intel_ddi.c
>> @@ -2720,7 +2720,7 @@ static bool intel_ddi_compute_config(struct intel_encoder *encoder,
>>  	enum port port = encoder->port;
>>  	int ret;
>>  
>> -	if (port == PORT_A)
>> +	if (port == PORT_A && !intel_vgpu_active(dev_priv))
>>  		pipe_config->cpu_transcoder = TRANSCODER_EDP;
>>  
>>  	if (intel_crtc_has_type(pipe_config, INTEL_OUTPUT_HDMI))
>
> --
> Jani Nikula, Intel Open Source Technology Center

--
Jani Nikula, Intel Open Source Technology Center
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index db92a26..9f5e85c 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -2720,7 +2720,7 @@  static bool intel_ddi_compute_config(struct intel_encoder *encoder,
 	enum port port = encoder->port;
 	int ret;
 
-	if (port == PORT_A)
+	if (port == PORT_A && !intel_vgpu_active(dev_priv))
 		pipe_config->cpu_transcoder = TRANSCODER_EDP;
 
 	if (intel_crtc_has_type(pipe_config, INTEL_OUTPUT_HDMI))