[PATCH v1 2/2] drm/virtio: Add the hotplug_mode_update property for rescanning of modes
Kasireddy, Vivek
vivek.kasireddy at intel.com
Tue Jan 10 01:42:01 UTC 2023
Hi Gerd,
>
> On Thu, Nov 17, 2022 at 05:30:54PM -0800, Vivek Kasireddy wrote:
> > Setting this property will allow the userspace to look for new modes or
> > position info when a hotplug event occurs.
>
> This works just fine for modes today.
>
> I assume this is this need to have userspace also check for position
> info updates added by patch #1)?
[Kasireddy, Vivek] Yes, that is exactly the reason why this property is needed. In
other words, Mutter does not seem to look at suggested_x/y values (or position info)
if hotplug_mode_property is not there. Here is the relevant piece of code in Mutter:
static gboolean
meta_monitor_normal_get_suggested_position (MetaMonitor *monitor,
int *x,
int *y)
{
const MetaOutputInfo *output_info =
meta_monitor_get_main_output_info (monitor);
if (!output_info->hotplug_mode_update)
return FALSE;
if (output_info->suggested_x < 0 && output_info->suggested_y < 0)
return FALSE;
if (x)
*x = output_info->suggested_x;
if (y)
*y = output_info->suggested_y;
Thanks,
Vivek
>
> take care,
> Gerd
More information about the dri-devel
mailing list