Markus Armbruster <[email protected]> writes:

> I missed this one somehow.  My apologies!
>
> Alex Bennée <[email protected]> writes:
>
>> From: Andrew Keesler <[email protected]>
>>
>> In 454f4b0f, we started down the path of supporting separate
>> configurations per display head (e.g., you have 2 heads - one with
>> EDID name "AAA" and the other with EDID name "BBB").
>>
>> In this change, we add resolution to this configuration surface (e.g.,
>> you have 2 heads - one with resolution 111x222 and the other with
>> resolution 333x444).
>>
>>   -display vnc=localhost:0,id=aaa,display=vga,head=0 \
>>   -display vnc=localhost:1,id=bbb,display=vga,head=1 \
>>   -device '{"driver":"virtio-vga",
>>             "max_outputs":2,
>>             "id":"vga",
>>             "outputs":[
>>               {
>>                  "name":"AAA",
>>                  "xres":111,
>>                  "yres":222
>>               },
>>               {
>>                  "name":"BBB",
>>                  "xres":333,
>>                  "yres":444
>>               }
>>             ]}'
>>
>> Here is the behavior matrix of the current resolution configuration
>> surface (xres/yres) with the new resolution configuration surface
>> (outputs[i].xres/yres).
>>
>> Case: !(xres || yres) && !(outputs[i].has_xres && outputs[i].has_yres)
>> Behavior: current behavior - outputs[0] enabled with default xres/yres
>>
>> Case: (xres || yres) && !(outputs[i].has_xres && outputs[i].has_yres)
>> Behavior: current behavior - outputs[0] enabled with xres/yres
>>
>> Case: !(xres || yres) && (outputs[i].has_xres && outputs[i].has_yres)
>> Behavior: new behavior - outputs[i] enabled with outputs[i].xres/yres
>>
>> Case: (xres || yres) && (outputs[i].has_xres && outputs[i].has_yres)
>> Behavior: new behavior - outputs[i] enabled with outputs[i].xres/yres
>>
>> Signed-off-by: Andrew Keesler <[email protected]>
>> Reviewed-by: Daniel P. Berrangé <[email protected]>
>> Message-ID: <[email protected]>
>> [AJB: dropped pointless output_idx range check, tweak commit]
>> Message-ID: <[email protected]>
>> Signed-off-by: Alex Bennée <[email protected]>
>>
>> diff --git a/qapi/virtio.json b/qapi/virtio.json
>> index 05295ab6655..0ce789bb22f 100644
>> --- a/qapi/virtio.json
>> +++ b/qapi/virtio.json
>> @@ -971,15 +971,21 @@
>>  ##
>>  # @VirtIOGPUOutput:
>>  #
>> -# Describes configuration of a VirtIO GPU output.
>> +# Describes configuration of a VirtIO GPU output. If both xres and
>> +# yres are set, they take precedence over root virtio-gpu
>
> Please use @NAME to refer to a local member or argument NAME for proper
> rendering.
>
> Elsewhere, we use @width and @height.  Consistency is desirable.
>
> What happens when only one of @xres and @yres are provided?

*sigh* OK I'll drop this from the PR.

>
>> +# resolution configuration and enable the corresponding output.
>>  #
>>  # @name: the name of the output
>>  #
>> +# @xres: horizontal resolution of the output in pixels (since 10.2)
>> +#
>> +# @yres: vertical resolution of the output in pixels (since 10.2)
>> +#
>>  # Since: 10.1
>>  ##
>>  
>>  { 'struct': 'VirtIOGPUOutput',
>> -  'data': { 'name': 'str' } }
>> +  'data': { 'name': 'str', '*xres': 'uint16', '*yres': 'uint16' } }
>>  
>>  ##
>>  # @DummyVirtioForceArrays:
>
> [...]

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to