mbox series

[0/5] Clean up TTM mmap offsets

Message ID 20190207085931.29569-1-tzimmermann@suse.de (mailing list archive)
Headers show
Series Clean up TTM mmap offsets | expand

Message

Thomas Zimmermann Feb. 7, 2019, 8:59 a.m. UTC
Almost all TTM-based drivers use the same values for the mmap-able
range of BO addresses. Each driver therefore duplicates the 
DRM_FILE_PAGE_OFFSET constant. OTOH, the mmap range's size is not
configurable by drivers.

This patch set replaces driver-specific configuration with a single
setup. All code is located within TTM. TTM and GEM share the same
range for mmap-able BOs.

Thomas Zimmermann (5):
  staging/vboxvideo: Use same BO mmap offset as other drivers
  drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant
  drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()
  drm/ttm: Quick-test mmap offset in ttm_bo_mmap()
  drm: Use the same mmap-range offset and size for GEM and TTM

 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c     | 12 ++----------
 drivers/gpu/drm/ast/ast_drv.h               |  2 --
 drivers/gpu/drm/ast/ast_ttm.c               | 10 ++--------
 drivers/gpu/drm/bochs/bochs.h               |  2 --
 drivers/gpu/drm/bochs/bochs_mm.c            | 10 ++--------
 drivers/gpu/drm/cirrus/cirrus_drv.h         |  1 -
 drivers/gpu/drm/cirrus/cirrus_ttm.c         | 10 ++--------
 drivers/gpu/drm/drm_gem.c                   | 17 -----------------
 drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 12 ++----------
 drivers/gpu/drm/mgag200/mgag200_drv.h       |  1 -
 drivers/gpu/drm/mgag200/mgag200_ttm.c       | 10 ++--------
 drivers/gpu/drm/nouveau/nouveau_drv.h       |  2 --
 drivers/gpu/drm/nouveau/nouveau_ttm.c       |  4 ----
 drivers/gpu/drm/qxl/qxl_drv.h               |  3 ---
 drivers/gpu/drm/qxl/qxl_ttm.c               | 11 +++--------
 drivers/gpu/drm/radeon/radeon_ttm.c         | 13 ++-----------
 drivers/gpu/drm/ttm/ttm_bo.c                |  6 +++---
 drivers/gpu/drm/ttm/ttm_bo_vm.c             |  3 +++
 drivers/gpu/drm/virtio/virtgpu_ttm.c        |  4 +---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c         |  1 -
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h         |  1 -
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c    | 11 ++---------
 drivers/staging/vboxvideo/vbox_drv.h        |  2 --
 drivers/staging/vboxvideo/vbox_ttm.c        | 12 +++---------
 include/drm/drm_vma_manager.h               | 12 ++++++++++++
 include/drm/ttm/ttm_bo_driver.h             |  2 +-
 26 files changed, 42 insertions(+), 132 deletions(-)

Comments

Christian König Feb. 7, 2019, 9:36 a.m. UTC | #1
Am 07.02.19 um 09:59 schrieb Thomas Zimmermann:
> Almost all TTM-based drivers use the same values for the mmap-able
> range of BO addresses. Each driver therefore duplicates the
> DRM_FILE_PAGE_OFFSET constant. OTOH, the mmap range's size is not
> configurable by drivers.
>
> This patch set replaces driver-specific configuration with a single
> setup. All code is located within TTM. TTM and GEM share the same
> range for mmap-able BOs.
>
> Thomas Zimmermann (5):
>    staging/vboxvideo: Use same BO mmap offset as other drivers
>    drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant
>    drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()
>    drm/ttm: Quick-test mmap offset in ttm_bo_mmap()
>    drm: Use the same mmap-range offset and size for GEM and TTM

Reviewed-by: Christian König <christian.koenig@amd.com> for the whole 
series.

Nice cleanup! Thanks,
Christian.

>
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c     | 12 ++----------
>   drivers/gpu/drm/ast/ast_drv.h               |  2 --
>   drivers/gpu/drm/ast/ast_ttm.c               | 10 ++--------
>   drivers/gpu/drm/bochs/bochs.h               |  2 --
>   drivers/gpu/drm/bochs/bochs_mm.c            | 10 ++--------
>   drivers/gpu/drm/cirrus/cirrus_drv.h         |  1 -
>   drivers/gpu/drm/cirrus/cirrus_ttm.c         | 10 ++--------
>   drivers/gpu/drm/drm_gem.c                   | 17 -----------------
>   drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 12 ++----------
>   drivers/gpu/drm/mgag200/mgag200_drv.h       |  1 -
>   drivers/gpu/drm/mgag200/mgag200_ttm.c       | 10 ++--------
>   drivers/gpu/drm/nouveau/nouveau_drv.h       |  2 --
>   drivers/gpu/drm/nouveau/nouveau_ttm.c       |  4 ----
>   drivers/gpu/drm/qxl/qxl_drv.h               |  3 ---
>   drivers/gpu/drm/qxl/qxl_ttm.c               | 11 +++--------
>   drivers/gpu/drm/radeon/radeon_ttm.c         | 13 ++-----------
>   drivers/gpu/drm/ttm/ttm_bo.c                |  6 +++---
>   drivers/gpu/drm/ttm/ttm_bo_vm.c             |  3 +++
>   drivers/gpu/drm/virtio/virtgpu_ttm.c        |  4 +---
>   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c         |  1 -
>   drivers/gpu/drm/vmwgfx/vmwgfx_drv.h         |  1 -
>   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c    | 11 ++---------
>   drivers/staging/vboxvideo/vbox_drv.h        |  2 --
>   drivers/staging/vboxvideo/vbox_ttm.c        | 12 +++---------
>   include/drm/drm_vma_manager.h               | 12 ++++++++++++
>   include/drm/ttm/ttm_bo_driver.h             |  2 +-
>   26 files changed, 42 insertions(+), 132 deletions(-)
>
Thomas Zimmermann Feb. 7, 2019, 9:45 a.m. UTC | #2
Am 07.02.19 um 10:36 schrieb Koenig, Christian:
> Am 07.02.19 um 09:59 schrieb Thomas Zimmermann:
>> Almost all TTM-based drivers use the same values for the mmap-able
>> range of BO addresses. Each driver therefore duplicates the
>> DRM_FILE_PAGE_OFFSET constant. OTOH, the mmap range's size is not
>> configurable by drivers.
>>
>> This patch set replaces driver-specific configuration with a single
>> setup. All code is located within TTM. TTM and GEM share the same
>> range for mmap-able BOs.
>>
>> Thomas Zimmermann (5):
>>    staging/vboxvideo: Use same BO mmap offset as other drivers
>>    drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant
>>    drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()
>>    drm/ttm: Quick-test mmap offset in ttm_bo_mmap()
>>    drm: Use the same mmap-range offset and size for GEM and TTM
> 
> Reviewed-by: Christian König <christian.koenig@amd.com> for the whole 
> series.

That was quick! Thank you.

> 
> Nice cleanup! Thanks,
> Christian.
> 
>>
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c     | 12 ++----------
>>   drivers/gpu/drm/ast/ast_drv.h               |  2 --
>>   drivers/gpu/drm/ast/ast_ttm.c               | 10 ++--------
>>   drivers/gpu/drm/bochs/bochs.h               |  2 --
>>   drivers/gpu/drm/bochs/bochs_mm.c            | 10 ++--------
>>   drivers/gpu/drm/cirrus/cirrus_drv.h         |  1 -
>>   drivers/gpu/drm/cirrus/cirrus_ttm.c         | 10 ++--------
>>   drivers/gpu/drm/drm_gem.c                   | 17 -----------------
>>   drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 12 ++----------
>>   drivers/gpu/drm/mgag200/mgag200_drv.h       |  1 -
>>   drivers/gpu/drm/mgag200/mgag200_ttm.c       | 10 ++--------
>>   drivers/gpu/drm/nouveau/nouveau_drv.h       |  2 --
>>   drivers/gpu/drm/nouveau/nouveau_ttm.c       |  4 ----
>>   drivers/gpu/drm/qxl/qxl_drv.h               |  3 ---
>>   drivers/gpu/drm/qxl/qxl_ttm.c               | 11 +++--------
>>   drivers/gpu/drm/radeon/radeon_ttm.c         | 13 ++-----------
>>   drivers/gpu/drm/ttm/ttm_bo.c                |  6 +++---
>>   drivers/gpu/drm/ttm/ttm_bo_vm.c             |  3 +++
>>   drivers/gpu/drm/virtio/virtgpu_ttm.c        |  4 +---
>>   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c         |  1 -
>>   drivers/gpu/drm/vmwgfx/vmwgfx_drv.h         |  1 -
>>   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c    | 11 ++---------
>>   drivers/staging/vboxvideo/vbox_drv.h        |  2 --
>>   drivers/staging/vboxvideo/vbox_ttm.c        | 12 +++---------
>>   include/drm/drm_vma_manager.h               | 12 ++++++++++++
>>   include/drm/ttm/ttm_bo_driver.h             |  2 +-
>>   26 files changed, 42 insertions(+), 132 deletions(-)
>>
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
kernel test robot via dri-devel Feb. 15, 2019, 3:25 p.m. UTC | #3
Hi,

On 2/7/19 9:59 AM, Thomas Zimmermann wrote:
> Almost all TTM-based drivers use the same values for the mmap-able
> range of BO addresses. Each driver therefore duplicates the
> DRM_FILE_PAGE_OFFSET constant. OTOH, the mmap range's size is not
> configurable by drivers.
> 
> This patch set replaces driver-specific configuration with a single
> setup. All code is located within TTM. TTM and GEM share the same
> range for mmap-able BOs.
> 
> Thomas Zimmermann (5):
>    staging/vboxvideo: Use same BO mmap offset as other drivers
>    drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant
>    drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()
>    drm/ttm: Quick-test mmap offset in ttm_bo_mmap()
>    drm: Use the same mmap-range offset and size for GEM and TTM

The first patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

The vboxvideo bits in the other patches look good to me to:

Acked-by: Hans de Goede <hdegoede@redhat.com>

For the other patches in the series.

Regards,

Hans
Christian König Feb. 26, 2019, 1:01 p.m. UTC | #4
Am 07.02.19 um 10:45 schrieb Thomas Zimmermann:
> Am 07.02.19 um 10:36 schrieb Koenig, Christian:
>> Am 07.02.19 um 09:59 schrieb Thomas Zimmermann:
>>> Almost all TTM-based drivers use the same values for the mmap-able
>>> range of BO addresses. Each driver therefore duplicates the
>>> DRM_FILE_PAGE_OFFSET constant. OTOH, the mmap range's size is not
>>> configurable by drivers.
>>>
>>> This patch set replaces driver-specific configuration with a single
>>> setup. All code is located within TTM. TTM and GEM share the same
>>> range for mmap-able BOs.
>>>
>>> Thomas Zimmermann (5):
>>>     staging/vboxvideo: Use same BO mmap offset as other drivers
>>>     drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant
>>>     drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()
>>>     drm/ttm: Quick-test mmap offset in ttm_bo_mmap()
>>>     drm: Use the same mmap-range offset and size for GEM and TTM
>> Reviewed-by: Christian König <christian.koenig@amd.com> for the whole
>> series.
> That was quick! Thank you.

FYI I just pushed this series into our internal branch for upstreaming.

Regards,
Christian.

>
>> Nice cleanup! Thanks,
>> Christian.
>>
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c     | 12 ++----------
>>>    drivers/gpu/drm/ast/ast_drv.h               |  2 --
>>>    drivers/gpu/drm/ast/ast_ttm.c               | 10 ++--------
>>>    drivers/gpu/drm/bochs/bochs.h               |  2 --
>>>    drivers/gpu/drm/bochs/bochs_mm.c            | 10 ++--------
>>>    drivers/gpu/drm/cirrus/cirrus_drv.h         |  1 -
>>>    drivers/gpu/drm/cirrus/cirrus_ttm.c         | 10 ++--------
>>>    drivers/gpu/drm/drm_gem.c                   | 17 -----------------
>>>    drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 12 ++----------
>>>    drivers/gpu/drm/mgag200/mgag200_drv.h       |  1 -
>>>    drivers/gpu/drm/mgag200/mgag200_ttm.c       | 10 ++--------
>>>    drivers/gpu/drm/nouveau/nouveau_drv.h       |  2 --
>>>    drivers/gpu/drm/nouveau/nouveau_ttm.c       |  4 ----
>>>    drivers/gpu/drm/qxl/qxl_drv.h               |  3 ---
>>>    drivers/gpu/drm/qxl/qxl_ttm.c               | 11 +++--------
>>>    drivers/gpu/drm/radeon/radeon_ttm.c         | 13 ++-----------
>>>    drivers/gpu/drm/ttm/ttm_bo.c                |  6 +++---
>>>    drivers/gpu/drm/ttm/ttm_bo_vm.c             |  3 +++
>>>    drivers/gpu/drm/virtio/virtgpu_ttm.c        |  4 +---
>>>    drivers/gpu/drm/vmwgfx/vmwgfx_drv.c         |  1 -
>>>    drivers/gpu/drm/vmwgfx/vmwgfx_drv.h         |  1 -
>>>    drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c    | 11 ++---------
>>>    drivers/staging/vboxvideo/vbox_drv.h        |  2 --
>>>    drivers/staging/vboxvideo/vbox_ttm.c        | 12 +++---------
>>>    include/drm/drm_vma_manager.h               | 12 ++++++++++++
>>>    include/drm/ttm/ttm_bo_driver.h             |  2 +-
>>>    26 files changed, 42 insertions(+), 132 deletions(-)
>>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Am 07.02.19 um 10:45 schrieb Thomas
      Zimmermann:<br>
    </div>
    <blockquote type="cite"
      cite="mid:552aa321-98d4-344d-eda2-8441940b5811@suse.de">
      <pre class="moz-quote-pre" wrap="">Am 07.02.19 um 10:36 schrieb Koenig, Christian:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Am 07.02.19 um 09:59 schrieb Thomas Zimmermann:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">Almost all TTM-based drivers use the same values for the mmap-able
range of BO addresses. Each driver therefore duplicates the
DRM_FILE_PAGE_OFFSET constant. OTOH, the mmap range's size is not
configurable by drivers.

This patch set replaces driver-specific configuration with a single
setup. All code is located within TTM. TTM and GEM share the same
range for mmap-able BOs.

Thomas Zimmermann (5):
   staging/vboxvideo: Use same BO mmap offset as other drivers
   drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant
   drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()
   drm/ttm: Quick-test mmap offset in ttm_bo_mmap()
   drm: Use the same mmap-range offset and size for GEM and TTM
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
Reviewed-by: Christian König <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com">&lt;christian.koenig@amd.com&gt;</a> for the whole 
series.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
That was quick! Thank you.</pre>
    </blockquote>
    <br>
    FYI I just pushed this series into our internal branch for
    upstreaming.<br>
    <br>
    Regards,<br>
    Christian.<br>
    <br>
    <blockquote type="cite"
      cite="mid:552aa321-98d4-344d-eda2-8441940b5811@suse.de">
      <pre class="moz-quote-pre" wrap="">

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">
Nice cleanup! Thanks,
Christian.

</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c     | 12 ++----------
  drivers/gpu/drm/ast/ast_drv.h               |  2 --
  drivers/gpu/drm/ast/ast_ttm.c               | 10 ++--------
  drivers/gpu/drm/bochs/bochs.h               |  2 --
  drivers/gpu/drm/bochs/bochs_mm.c            | 10 ++--------
  drivers/gpu/drm/cirrus/cirrus_drv.h         |  1 -
  drivers/gpu/drm/cirrus/cirrus_ttm.c         | 10 ++--------
  drivers/gpu/drm/drm_gem.c                   | 17 -----------------
  drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 12 ++----------
  drivers/gpu/drm/mgag200/mgag200_drv.h       |  1 -
  drivers/gpu/drm/mgag200/mgag200_ttm.c       | 10 ++--------
  drivers/gpu/drm/nouveau/nouveau_drv.h       |  2 --
  drivers/gpu/drm/nouveau/nouveau_ttm.c       |  4 ----
  drivers/gpu/drm/qxl/qxl_drv.h               |  3 ---
  drivers/gpu/drm/qxl/qxl_ttm.c               | 11 +++--------
  drivers/gpu/drm/radeon/radeon_ttm.c         | 13 ++-----------
  drivers/gpu/drm/ttm/ttm_bo.c                |  6 +++---
  drivers/gpu/drm/ttm/ttm_bo_vm.c             |  3 +++
  drivers/gpu/drm/virtio/virtgpu_ttm.c        |  4 +---
  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c         |  1 -
  drivers/gpu/drm/vmwgfx/vmwgfx_drv.h         |  1 -
  drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c    | 11 ++---------
  drivers/staging/vboxvideo/vbox_drv.h        |  2 --
  drivers/staging/vboxvideo/vbox_ttm.c        | 12 +++---------
  include/drm/drm_vma_manager.h               | 12 ++++++++++++
  include/drm/ttm/ttm_bo_driver.h             |  2 +-
  26 files changed, 42 insertions(+), 132 deletions(-)

</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
Hans de Goede March 11, 2019, 4:39 p.m. UTC | #5
Hi,

On 07-02-19 09:59, Thomas Zimmermann wrote:
> Almost all TTM-based drivers use the same values for the mmap-able
> range of BO addresses. Each driver therefore duplicates the
> DRM_FILE_PAGE_OFFSET constant. OTOH, the mmap range's size is not
> configurable by drivers.
> 
> This patch set replaces driver-specific configuration with a single
> setup. All code is located within TTM. TTM and GEM share the same
> range for mmap-able BOs.
> 
> Thomas Zimmermann (5):
>    staging/vboxvideo: Use same BO mmap offset as other drivers
>    drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant
>    drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()
>    drm/ttm: Quick-test mmap offset in ttm_bo_mmap()
>    drm: Use the same mmap-range offset and size for GEM and TTM

Note I'm about to push a patch-series to drm-misc-next which moves
vboxvideo out of staging and I see that this series has not landed
in drm-misc-next yet, so it will needs to be rebased.

Regards,

Hans
Christian König March 11, 2019, 4:51 p.m. UTC | #6
Am 11.03.19 um 17:39 schrieb Hans de Goede:
> Hi,
>
> On 07-02-19 09:59, Thomas Zimmermann wrote:
>> Almost all TTM-based drivers use the same values for the mmap-able
>> range of BO addresses. Each driver therefore duplicates the
>> DRM_FILE_PAGE_OFFSET constant. OTOH, the mmap range's size is not
>> configurable by drivers.
>>
>> This patch set replaces driver-specific configuration with a single
>> setup. All code is located within TTM. TTM and GEM share the same
>> range for mmap-able BOs.
>>
>> Thomas Zimmermann (5):
>>    staging/vboxvideo: Use same BO mmap offset as other drivers
>>    drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant
>>    drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()
>>    drm/ttm: Quick-test mmap offset in ttm_bo_mmap()
>>    drm: Use the same mmap-range offset and size for GEM and TTM
>
> Note I'm about to push a patch-series to drm-misc-next which moves
> vboxvideo out of staging and I see that this series has not landed
> in drm-misc-next yet, so it will needs to be rebased.

Mhm, TTM is usually not pushed upstream through drm-misc-next, so that 
will certainly collide with the next TTM pull request.

So can you wait with that or should I make an exception and merge this 
change though drm-misc-next?

Christian.

>
> Regards,
>
> Hans
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hans de Goede March 11, 2019, 5 p.m. UTC | #7
Hi,

On 11-03-19 17:51, Christian König wrote:
> Am 11.03.19 um 17:39 schrieb Hans de Goede:
>> Hi,
>>
>> On 07-02-19 09:59, Thomas Zimmermann wrote:
>>> Almost all TTM-based drivers use the same values for the mmap-able
>>> range of BO addresses. Each driver therefore duplicates the
>>> DRM_FILE_PAGE_OFFSET constant. OTOH, the mmap range's size is not
>>> configurable by drivers.
>>>
>>> This patch set replaces driver-specific configuration with a single
>>> setup. All code is located within TTM. TTM and GEM share the same
>>> range for mmap-able BOs.
>>>
>>> Thomas Zimmermann (5):
>>>    staging/vboxvideo: Use same BO mmap offset as other drivers
>>>    drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant
>>>    drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()
>>>    drm/ttm: Quick-test mmap offset in ttm_bo_mmap()
>>>    drm: Use the same mmap-range offset and size for GEM and TTM
>>
>> Note I'm about to push a patch-series to drm-misc-next which moves
>> vboxvideo out of staging and I see that this series has not landed
>> in drm-misc-next yet, so it will needs to be rebased.
> 
> Mhm, TTM is usually not pushed upstream through drm-misc-next, so that will certainly collide with the next TTM pull request.

Ugh, I didn't realize that this series would not be going through drm-misc-next.

> So can you wait with that or should I make an exception and merge this change though drm-misc-next?

I've already pushed it now :| My mail was more intended as a headsup then
that I expected an objection, sorry.

I see 2 possible solutions:

1) Merge drm-misc-next into the ttm tree (probably the cleanest)
2) Push your series through drm-misc-next

Regards,

Hans
Daniel Vetter March 11, 2019, 5:02 p.m. UTC | #8
On Mon, Mar 11, 2019 at 05:51:39PM +0100, Christian König wrote:
> Am 11.03.19 um 17:39 schrieb Hans de Goede:
> > Hi,
> > 
> > On 07-02-19 09:59, Thomas Zimmermann wrote:
> > > Almost all TTM-based drivers use the same values for the mmap-able
> > > range of BO addresses. Each driver therefore duplicates the
> > > DRM_FILE_PAGE_OFFSET constant. OTOH, the mmap range's size is not
> > > configurable by drivers.
> > > 
> > > This patch set replaces driver-specific configuration with a single
> > > setup. All code is located within TTM. TTM and GEM share the same
> > > range for mmap-able BOs.
> > > 
> > > Thomas Zimmermann (5):
> > >    staging/vboxvideo: Use same BO mmap offset as other drivers
> > >    drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant
> > >    drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()
> > >    drm/ttm: Quick-test mmap offset in ttm_bo_mmap()
> > >    drm: Use the same mmap-range offset and size for GEM and TTM
> > 
> > Note I'm about to push a patch-series to drm-misc-next which moves
> > vboxvideo out of staging and I see that this series has not landed
> > in drm-misc-next yet, so it will needs to be rebased.
> 
> Mhm, TTM is usually not pushed upstream through drm-misc-next, so that will
> certainly collide with the next TTM pull request.
> 
> So can you wait with that or should I make an exception and merge this
> change though drm-misc-next?

Other options:
- Get amdgpu added to drm-tip and linux-next so we have a heads-up about
  the conflict. That's usually good enough to avoid the broken merge
  conflict.
- Do a topic branch, pull it into both trees.
- Really stuff ttm into a shared tree if it's meant to be shared
  infrastructure :-P

Waiting+rebasing is imo the worst option, and usually not needed.
-Daniel