All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Vidya Srinivas <vidya.srinivas@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm: Fix for invalid pruning of modes in dual	display cases
Date: Tue, 13 Dec 2016 12:28:59 +0200	[thread overview]
Message-ID: <87fulst95g.fsf@intel.com> (raw)
In-Reply-To: <1481624214-13595-1-git-send-email-vidya.srinivas@intel.com>

On Tue, 13 Dec 2016, Vidya Srinivas <vidya.srinivas@intel.com> wrote:
> Currently in dual display connected boot scenarios, minimum of the resolutions
> is taken for fb width and height as reference. Based on this resolution, other
> modes are pruned.
>
> Example Scenario: If DSI mode is 2560x1440 and HDMI is 1920x1080, during the probing
> the fb width and height is set to max 1920x1080 and the DSI mode gets pruned as it is
> more than the reference. As a result, there is no DSI display.
> Patch fixes this issue by taking the max of the resolutions and creating the fb
> based on the same.
>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> ---
>  drivers/gpu/drm/drm_fb_helper.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index e934b54..6afc06f 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -1482,8 +1482,8 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>  	memset(&sizes, 0, sizeof(struct drm_fb_helper_surface_size));
>  	sizes.surface_depth = 24;
>  	sizes.surface_bpp = 32;
> -	sizes.fb_width = (unsigned)-1;
> -	sizes.fb_height = (unsigned)-1;
> +	sizes.fb_width = 0;
> +	sizes.fb_height = 0;
>  
>  	/* if driver picks 8 or 16 by default use that
>  	   for both depth/bpp */
> @@ -1560,9 +1560,9 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>  		}
>  
>  		if (lasth)
> -			sizes.fb_width  = min_t(u32, desired_mode->hdisplay + x, sizes.fb_width);
> +			sizes.fb_width  = max_t(u32, desired_mode->hdisplay + x, sizes.fb_width);
>  		if (lastv)
> -			sizes.fb_height = min_t(u32, desired_mode->vdisplay + y, sizes.fb_height);
> +			sizes.fb_height = max_t(u32, desired_mode->vdisplay + y, sizes.fb_height);
>  	}
>  
>  	if (crtc_count == 0 || sizes.fb_width == -1 || sizes.fb_height == -1) {

Not commenting on the main change itself, but just as a reminder, these
checks will need updating too.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-12-13 10:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13 10:16 [PATCH] drm: Fix for invalid pruning of modes in dual display cases Vidya Srinivas
2016-12-13 10:28 ` Jani Nikula [this message]
2016-12-13 10:45 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-12-13 10:46 ` [PATCH] " Chris Wilson
2016-12-13 14:52   ` [Intel-gfx] " Jani Nikula
2016-12-13 15:46     ` Ville Syrjälä
2017-01-16 10:13       ` Srinivas, Vidya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fulst95g.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=vidya.srinivas@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.