[PATCH] modesetting: and entity setup to generic probe path.

Emil Velikov emil.l.velikov at gmail.com
Wed Nov 18 08:15:45 PST 2015


On 17 November 2015 at 23:58, Dave Airlie <airlied at gmail.com> wrote:
> On 17 November 2015 at 21:57, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> On 17 November 2015 at 00:23, Dave Airlie <airlied at gmail.com> wrote:
>>> From: Dave Airlie <airlied at redhat.com>
>>>
>>> Totally untested, cross fingers hope it works.
>>>
>>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>>> ---
>>>  hw/xfree86/drivers/modesetting/driver.c | 25 +++++++++++++++++++++----
>>>  1 file changed, 21 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
>>> index 2ca65fb..49a2925 100644
>>> --- a/hw/xfree86/drivers/modesetting/driver.c
>>> +++ b/hw/xfree86/drivers/modesetting/driver.c
>>> @@ -454,13 +454,12 @@ Probe(DriverPtr drv, int flags)
>>>      }
>>>
>>>      for (i = 0; i < numDevSections; i++) {
>>> -
>>> +        int entity_num;
>>>          dev = xf86FindOptionValue(devSections[i]->options, "kmsdev");
>>>          if (probe_hw(dev, NULL)) {
>>> -            int entity;
>>>
>>> -            entity = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE);
>>> -            scrn = xf86ConfigFbEntity(scrn, 0, entity, NULL, NULL, NULL, NULL);
>>> +            entity_num = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE);
>>> +            scrn = xf86ConfigFbEntity(scrn, 0, entity_num, NULL, NULL, NULL, NULL);
>> Changing entity to entity_num does not bring anything here. Split in
>> off into separate patch ?
>
> It just makes the code look the same in all the places that use it,
> and I have to move it up a few lines. I don't think it makes sense to
> bother doing this separately.
>
Fwiw I believe that combining cleanup/refactor and functionality
patches isn't a good idea. Of course we can get away with it, but it
feels somewhat dirty.

But if you find that 'it doesn't make sense' so be it.

-Emil


More information about the xorg-devel mailing list