Re: [Intel-gfx] [PATCH] drm/fbdev: Fallback to non tiled mode if all tiles not present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 1 Nov 2019 at 07:46, Manasi Navare <manasi.d.navare@xxxxxxxxx> wrote:
>
> In case of tiled displays, if we hotplug just one connector,
> fbcon currently just selects the preferred mode and if it is
> tiled mode then that becomes a problem if rest of the tiles are
> not present.
> So in the fbdev driver on hotplug when we probe the client modeset,
> we we dont find all the connectors for all tiles, then on a connector
> with one tile, just fallback to the first available non tiled mode
> to display over a single connector.
>
> Suggested-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Suggested-by: Dave Airlie <airlied@xxxxxxxxxx>
> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Cc: Dave Airlie <airlied@xxxxxxxxxx>
> Signed-off-by: Manasi Navare <manasi.d.navare@xxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_client_modeset.c | 29 ++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
> index 895b73f23079..e28a723587db 100644
> --- a/drivers/gpu/drm/drm_client_modeset.c
> +++ b/drivers/gpu/drm/drm_client_modeset.c
> @@ -114,6 +114,20 @@ drm_client_find_modeset(struct drm_client_dev *client, struct drm_crtc *crtc)
>         return NULL;
>  }
>
> +static struct drm_display_mode *
> +drm_connector_fallback_non_tiled_mode(struct drm_connector *connector)
> +{
> +       struct drm_display_mode *mode;
> +
> +       list_for_each_entry(mode, &connector->modes, head) {
> +               if (mode->hdisplay == connector->tile_h_size &&
> +                   mode->vdisplay == connector->tile_v_size)
> +                       continue;
> +               return mode;
> +       }
> +       return NULL;
> +}
> +
>  static struct drm_display_mode *
>  drm_connector_has_preferred_mode(struct drm_connector *connector, int width, int height)
>  {
> @@ -348,8 +362,17 @@ static bool drm_client_target_preferred(struct drm_connector **connectors,
>         struct drm_connector *connector;
>         u64 conn_configured = 0;
>         int tile_pass = 0;
> +       int num_tiled_conns = 0;
>         int i;
>
> +       for (i = 0; i < connector_count; i++) {
> +               connector = connectors[i];
> +               if (!connector->has_tile)
> +                       continue;
> +
> +               num_tiled_conns ++;

Drop the space before the ++ here. Maybe just make this

if (connectors[i]->has_tile)
        num_tiled_conns++;

Reviewed-by: Dave Airlie <airlied@xxxxxxxxxx>

Otherwise I think this seems fine, though it does beg the question in
my mind of what happens if I get 2 8K monitors, and plug the first
tile of one in, and the second tile of the other in.

Dave.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux