Re: [Intel-gfx] [PATCH] drm/i915/bios: Fix ports mask

2021-07-22 Thread Christoph Hellwig
> > init_vbt_missing_defaults(struct drm_i915_private *i915)
> > {
> > enum port port;
> > -   int ports = PORT_A | PORT_B | PORT_C | PORT_D | PORT_E | PORT_F;
> > +   int ports = BIT(PORT_A) | BIT(PORT_B) | BIT(PORT_C) | \
> > +   BIT(PORT_D) | BIT(PORT_E) | BIT(PORT_F);

No need for the \, this isn't a macro.
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/bios: Fix ports mask

2021-07-21 Thread Lucas De Marchi

On Wed, Jul 21, 2021 at 06:00:23PM -0400, Rodrigo Vivi wrote:

PORT_A to PORT_F are regular integers defined in the enum port,
while for_each_port_masked requires a bit mask for the ports.

Current given mask: 0b111
Desired mask: 0b11

I noticed this while Christoph was reporting a bug found on headless
GVT configuration which bisect blamed commit 3ae04c0c7e63 ("drm/i915/bios:
limit default outputs to ports A through F")

Cc: Christoph Hellwig 
Fixes: 3ae04c0c7e63 ("drm/i915/bios: limit default outputs to ports A through 
F")
Cc: Lucas De Marchi 
Cc: Ville Syrjälä 
Cc: Jani Nikula 


humn.. something wrong with your git setup (maybe you have --suppress-cc
set?). Because people mentioned here were not actually Cc'ed. Adding
them.


Signed-off-by: Rodrigo Vivi 



Reviewed-by: Lucas De Marchi 

thanks
Lucas De Marchi



---
drivers/gpu/drm/i915/display/intel_bios.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c 
b/drivers/gpu/drm/i915/display/intel_bios.c
index 5b6922e28ef2..8bbeb5978bf7 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -2166,7 +2166,8 @@ static void
init_vbt_missing_defaults(struct drm_i915_private *i915)
{
enum port port;
-   int ports = PORT_A | PORT_B | PORT_C | PORT_D | PORT_E | PORT_F;
+   int ports = BIT(PORT_A) | BIT(PORT_B) | BIT(PORT_C) | \
+   BIT(PORT_D) | BIT(PORT_E) | BIT(PORT_F);

if (!HAS_DDI(i915) && !IS_CHERRYVIEW(i915))
return;
--
2.31.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/bios: Fix ports mask

2021-07-21 Thread Souza, Jose
On Wed, 2021-07-21 at 18:00 -0400, Rodrigo Vivi wrote:
> PORT_A to PORT_F are regular integers defined in the enum port,
> while for_each_port_masked requires a bit mask for the ports.
> 
> Current given mask: 0b111
> Desired mask: 0b11
> 
> I noticed this while Christoph was reporting a bug found on headless
> GVT configuration which bisect blamed commit 3ae04c0c7e63 ("drm/i915/bios:
> limit default outputs to ports A through F")
> 

Reviewed-by: José Roberto de Souza 

> Cc: Christoph Hellwig 
> Fixes: 3ae04c0c7e63 ("drm/i915/bios: limit default outputs to ports A through 
> F")
> Cc: Lucas De Marchi 
> Cc: Ville Syrjälä 
> Cc: Jani Nikula 
> Signed-off-by: Rodrigo Vivi 
> ---
>  drivers/gpu/drm/i915/display/intel_bios.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c 
> b/drivers/gpu/drm/i915/display/intel_bios.c
> index 5b6922e28ef2..8bbeb5978bf7 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -2166,7 +2166,8 @@ static void
>  init_vbt_missing_defaults(struct drm_i915_private *i915)
>  {
>   enum port port;
> - int ports = PORT_A | PORT_B | PORT_C | PORT_D | PORT_E | PORT_F;
> + int ports = BIT(PORT_A) | BIT(PORT_B) | BIT(PORT_C) | \
> + BIT(PORT_D) | BIT(PORT_E) | BIT(PORT_F);
>  
>   if (!HAS_DDI(i915) && !IS_CHERRYVIEW(i915))
>   return;

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915/bios: Fix ports mask

2021-07-21 Thread Rodrigo Vivi
PORT_A to PORT_F are regular integers defined in the enum port,
while for_each_port_masked requires a bit mask for the ports.

Current given mask: 0b111
Desired mask: 0b11

I noticed this while Christoph was reporting a bug found on headless
GVT configuration which bisect blamed commit 3ae04c0c7e63 ("drm/i915/bios:
limit default outputs to ports A through F")

Cc: Christoph Hellwig 
Fixes: 3ae04c0c7e63 ("drm/i915/bios: limit default outputs to ports A through 
F")
Cc: Lucas De Marchi 
Cc: Ville Syrjälä 
Cc: Jani Nikula 
Signed-off-by: Rodrigo Vivi 
---
 drivers/gpu/drm/i915/display/intel_bios.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c 
b/drivers/gpu/drm/i915/display/intel_bios.c
index 5b6922e28ef2..8bbeb5978bf7 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -2166,7 +2166,8 @@ static void
 init_vbt_missing_defaults(struct drm_i915_private *i915)
 {
enum port port;
-   int ports = PORT_A | PORT_B | PORT_C | PORT_D | PORT_E | PORT_F;
+   int ports = BIT(PORT_A) | BIT(PORT_B) | BIT(PORT_C) | \
+   BIT(PORT_D) | BIT(PORT_E) | BIT(PORT_F);
 
if (!HAS_DDI(i915) && !IS_CHERRYVIEW(i915))
return;
-- 
2.31.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx