dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] make struct drm_mm_node embeddable
@ 2010-11-12 17:36 Daniel Vetter
  2010-11-12 17:36 ` [PATCH 1/9] drm/nouveau: don't munge in drm_mm internals Daniel Vetter
                   ` (10 more replies)
  0 siblings, 11 replies; 29+ messages in thread
From: Daniel Vetter @ 2010-11-12 17:36 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

Hi all,

This patch-set changes the algorithm in drm_mm.c to not need additional
allocations to track free space and adds an api to make embedding struct
drm_mm_node possible. Benefits:

- If struct drm_mm_node is provided, no allocations need to be done anymore
  in drm_mm. It looks like some decent surgery, but ttm should be able to
  drop its preallocation dance.
- void *priv is back, but done right ;)
- Avoids a pointer chase when lru-scanning in i915 and saves a few bytes.

As a proof of concept I've converted i915. Beware though, the drm/i915
patches depend on my direct-gtt patches (which are actually the reason for
this series here).

Tested on my i855gm, i945gme, ironlake and agp rv570.

Comments, flames, reviews highly welcome.

Please consider merging the core drm parts (and the nouveau prep patch) for
-next (the i915 patches need coordination with Chris Wilson, they're rather
invasive).

Thanks, Daniel

Daniel Vetter (9):
  drm/nouveau: don't munge in drm_mm internals
  drm: mm: track free areas implicitly
  drm: mm: extract node insert helper functions
  drm: mm: add api for embedding struct drm_mm_node
  drm/i915: embed struct drm_mm_node into struct drm_i915_gem_object
  drm/i915: kill obj->gtt_offset
  drm/i915: kill gtt_list
  drm: mm: add helper to unwind scan state
  drm/i915: use drm_mm_for_each_scanned_node_reverse helper

 drivers/gpu/drm/drm_mm.c                 |  570 ++++++++++++++++-------------
 drivers/gpu/drm/i915/i915_debugfs.c      |   22 +-
 drivers/gpu/drm/i915/i915_drv.h          |   13 +-
 drivers/gpu/drm/i915/i915_gem.c          |  173 ++++-----
 drivers/gpu/drm/i915/i915_gem_debug.c    |   10 +-
 drivers/gpu/drm/i915/i915_gem_evict.c    |   37 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c      |   14 +-
 drivers/gpu/drm/i915/i915_gem_tiling.c   |    6 +-
 drivers/gpu/drm/i915/i915_irq.c          |   34 +-
 drivers/gpu/drm/i915/intel_display.c     |   26 +-
 drivers/gpu/drm/i915/intel_fb.c          |    6 +-
 drivers/gpu/drm/i915/intel_overlay.c     |   14 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c  |   10 +-
 drivers/gpu/drm/nouveau/nouveau_object.c |    2 +-
 drivers/gpu/drm/nouveau/nv50_instmem.c   |    2 +-
 include/drm/drm_mm.h                     |   49 ++-
 16 files changed, 525 insertions(+), 463 deletions(-)

^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [PATCH 0/9] make struct drm_mm_node embeddable
@ 2010-11-14 14:03 Sedat Dilek
  2010-11-14 14:38 ` Chris Wilson
  0 siblings, 1 reply; 29+ messages in thread
From: Sedat Dilek @ 2010-11-14 14:03 UTC (permalink / raw)
  To: DRI; +Cc: daniel.vetter

[ Please CC me I am not subscribed to dri-devel ML ]

[ QUOTE ]
Hi all,

This patch-set changes the algorithm in drm_mm.c to not need additional
allocations to track free space and adds an api to make embedding struct
drm_mm_node possible. Benefits:

- If struct drm_mm_node is provided, no allocations need to be done anymore
  in drm_mm. It looks like some decent surgery, but ttm should be able to
  drop its preallocation dance.
- void *priv is back, but done right ;)
- Avoids a pointer chase when lru-scanning in i915 and saves a few bytes.

As a proof of concept I've converted i915. Beware though, the drm/i915
patches depend on my direct-gtt patches (which are actually the reason for
this series here).

Tested on my i855gm, i945gme, ironlake and agp rv570.

Comments, flames, reviews highly welcome.
[ /QUOTE ]

Against which GIT tree or linux-next version are these patchset for?

- Sedat -


$ cd ~/src/linux-2.6/linux-2.6.37-rc1

$ echo $SINGLE_KERNEL_VARIANT
i386_none_686

$ LC_ALL=C fakeroot make -f debian/rules.gen
setup_${SINGLE_KERNEL_VARIANT} 2>&1 | tee ../setup.log
make -f debian/rules.real setup-flavour ABINAME='' ARCH='i386'
COMPILER='gcc-4.4' FEATURESET='none' FLAVOUR='686'
INITRD_CMD='update-initramfs' KCONFIG='debian/config/config
debian/config/kernelarch-x86/config
debian/config/kernelarch-x86/config-arch-32
debian/config/i386/none/config.686' KERNEL_ARCH='x86'
LOCALVERSION='-686' LOCALVERSION_HEADERS='' LOCALVERSION_IMAGE='-686'
MAJOR='2.6' MODULES='True'
SOURCEVERSION='2.6.37~rc1-11~next~20101112.1~dileks.1' TYPE='plain'
UPSTREAMVERSION='2.6.37-rc1' VERSION='2.6.37'
make[1]: Entering directory `/home/sd/src/linux-2.6/linux-2.6.37-rc1'
rm -rf 'debian/build/source'
mkdir -p 'debian/build/source'
cp -al COPYING CREDITS Documentation Kbuild Kconfig MAINTAINERS
Makefile README REPORTING-BUGS arch block crypto drivers firmware fs
include init ipc kernel lib mm net samples scripts security sound
tools usr virt .gitignore .mailmap 'debian/build/source'
cd 'debian/build/source'; python
'/home/sd/src/linux-2.6/linux-2.6.37-rc1/debian/bin/patch.apply'
--overwrite-home='/home/sd/src/linux-2.6/linux-2.6.37-rc1/debian/patches'
/home/sd/src/linux-2.6/linux-2.6.37-rc1/debian/bin/patch.apply:81:
DeprecationWarning: functions overriding warnings.showwarning() must
support the 'line' argument
  warn('No %s file, assuming Debian Linux %s' % (self._file, upstream))
Warning: No version.Debian file, assuming Debian Linux 2.6.37~rc1
1 out of 11 hunks FAILED -- saving rejects to file drivers/gpu/drm/drm_mm.c.rej
Error: Patch failed
--> Try to apply base.
  (+) OK   linux-next/patch-v2.6.37-rc1-next-20101112
  (+) OK   linux-next/0001-Remove-localversion-next.patch
  (+) OK   for-linux-next/drm-next/make-struct-drm_mm_node-embeddable/1-9-drm-nouveau-don-t-munge-in-drm_mm-internals.patch
  (+) FAIL for-linux-next/drm-next/make-struct-drm_mm_node-embeddable/2-9-drm-mm-track-free-areas-implicitly.patch
make[1]: *** [debian/stamps/source] Error 1
make[1]: Leaving directory `/home/sd/src/linux-2.6/linux-2.6.37-rc1'
make: *** [setup_i386_none_686_real] Error 2

^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [PATCH 0/9] make struct drm_mm_node embeddable
@ 2010-11-15 10:31 Sedat Dilek
  0 siblings, 0 replies; 29+ messages in thread
From: Sedat Dilek @ 2010-11-15 10:31 UTC (permalink / raw)
  To: DRI; +Cc: daniel.vetter

Hi Daniel,

I have tried a reduced patchset (w/o drm/i915 stuff) from [1] on a
RV250 with linux-next (next-20101115).
(See also P.S. for my full patchset)

# lspci -nnvv | grep "VGA compatible controller"
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon
RV250 [Mobility FireGL 9000] [1002:4c66] (rev 02) (prog-if 00 [VGA
controller])

Mesa is from master GIT:
commit 9cf25b3d1cd2910ae33e1faafa04629638bff0fe:
"r300g: return shader caps from Draw for SWTCL vertex shaders"

Also here I tried with Eric Anholt's OpenArena benchmark.
Seen from fps it is around 14 @ 1024x768 resolution (aprrox. same w/o
Daniel's patchset).
The only thing I see is garbage on my KDE4-desktop when benchmark ends.
Switching to a console (VT-1/VT-2) and changing back to X (default:
VT-7) makes the garbage go away.


Kind Regards,
- Sedat -

[1] http://cgit.freedesktop.org/~danvet/drm/log/?h=for-sedat-dilek

P.S.:
My full patchset looks like this - not sure if there is a correlation
with other drm/radeon patches:

$ grep OK setup_linux-next_next-20101115.1.log
  (+) OK   linux-next/patch-v2.6.37-rc1-next-20101115
  (+) OK   linux-next/0001-Remove-localversion-next.patch
  (+) OK   for-linux-next/next-iwlwifi-fix-modular-legacy-build-errors.patch
  (+) OK   none-BKL-config/drm-i810-remove-SMP-support-and-BKL.patch
  (+) OK   for-drm-radeon-testing/drm-radeon-kms-enable-writeback-on-radeon-AGP-boards.patch
  (+) OK   drm-vblank-timestamping/1-3-drm-vblank-Add-support-for-precise-vblank-timestamping.patch
  (+) OK   drm-vblank-timestamping/2-3-kms-radeon-Add-support-for-precise-vblank-timestamping.patch
  (+) OK   drm-vblank-timestamping/drm-i915-fix-assignment-obj_priv-to_intel_bo.patch
  (+) OK   drm-vblank-timestamping/3-3-kms-i915-Add-support-for-precise-vblank-timestamping.patch
  (+) OK   drm-vblank-timestamping/drm-i915-fix-error-implicit-declaration-of-function-IS_IRONLAKE.patch
  (+) OK   agd5f-pflip/0002-drm-radeon-kms-add-pageflip-ioctl-support.patch
  (+) OK   backlight-type/Backlight-Add-backlight-type-v2.patch
  (+) OK   backlight-type/radeon-Expose-backlight-class-device-for-legacy-LVDS-encoder.patch
  (+) OK   mm-fixes/cgroup-Avoid-a-memset-by-using-vzalloc.patch
  (+) OK   mm-fixes/kmemleak-remove-memset-by-using-kzalloc.patch
  (+) OK   linux-2.6-block-for-2.6.38-core/linux-2.6-block-for-2.6.38-core.patch
  (+) OK   tpm-fix/tpm-Autodetect-itpm-devices.patch
  (+) OK   danvet-drm-for-sedat-dilek/0001-drm-nouveau-don-t-munge-in-drm_mm-internals.patch
  (+) OK   danvet-drm-for-sedat-dilek/0002-drm_mm-add-support-for-range-restricted-fair-lru-sca.patch
  (+) OK   danvet-drm-for-sedat-dilek/0003-drm-mm-track-free-areas-implicitly.patch
  (+) OK   danvet-drm-for-sedat-dilek/0004-drm-mm-extract-node-insert-helper-functions.patch
  (+) OK   danvet-drm-for-sedat-dilek/0005-drm-mm-add-api-for-embedding-struct-drm_mm_node.patch
  (+) OK   danvet-drm-for-sedat-dilek/0006-drm-mm-add-helper-to-unwind-scan-state.patch
  (+) OK   debian/version.patch
  (+) OK   debian/kernelvariables-2.6.37.patch
  (+) OK   debian/doc-build-parallel.patch
  (+) OK   bugfix/ia64/hardcode-arch-script-output.patch
  (+) OK   bugfix/mips/disable-advansys.patch
  (+) OK   bugfix/arm/disable-scsi_acard.patch
  (+) OK   debian/mips-disable-werror.patch
  (+) OK   bugfix/powerpc/lpar-console.patch
  (+) OK   features/all/i915-autoload-without-CONFIG_DRM_I915_KMS.patch
  (+) OK   debian/arch-sh4-fix-uimage-build.patch
  (+) OK   bugfix/mips/mips-ide-flush-dcache.patch
  (+) OK   bugfix/all/qla4xxx-Fix-build-on-some-architectures-lacking-64-bit-I-O.patch
  (+) OK   bugfix/x86/Skip-looking-for-ioapic-overrides-when-ioapics-are-not-present.patch

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2010-11-15 20:51 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-12 17:36 [PATCH 0/9] make struct drm_mm_node embeddable Daniel Vetter
2010-11-12 17:36 ` [PATCH 1/9] drm/nouveau: don't munge in drm_mm internals Daniel Vetter
2010-11-12 17:36 ` [PATCH 2/9] drm: mm: track free areas implicitly Daniel Vetter
2010-11-12 17:36 ` [PATCH 3/9] drm: mm: extract node insert helper functions Daniel Vetter
2010-11-12 17:36 ` [PATCH 4/9] drm: mm: add api for embedding struct drm_mm_node Daniel Vetter
2010-11-12 17:36 ` [PATCH 5/9] drm/i915: embed struct drm_mm_node into struct drm_i915_gem_object Daniel Vetter
2010-11-12 17:36 ` [PATCH 6/9] drm/i915: kill obj->gtt_offset Daniel Vetter
2010-11-12 17:36 ` [PATCH 7/9] drm/i915: kill gtt_list Daniel Vetter
2010-11-12 17:36 ` [PATCH 8/9] drm: mm: add helper to unwind scan state Daniel Vetter
2010-11-12 17:36 ` [PATCH 9/9] drm/i915: use drm_mm_for_each_scanned_node_reverse helper Daniel Vetter
2010-11-12 17:56 ` [PATCH 0/9] make struct drm_mm_node embeddable Chris Wilson
2010-11-15  7:58 ` Thomas Hellstrom
2010-11-15 19:45   ` Daniel Vetter
2010-11-15 20:40     ` Thomas Hellstrom
2010-11-15 20:54       ` Daniel Vetter
2010-11-14 14:03 Sedat Dilek
2010-11-14 14:38 ` Chris Wilson
2010-11-14 15:52   ` Sedat Dilek
2010-11-14 16:13     ` Daniel Vetter
2010-11-14 16:56       ` Sedat Dilek
2010-11-14 17:14         ` Daniel Vetter
2010-11-14 17:27           ` Sedat Dilek
2010-11-14 17:52             ` Sedat Dilek
2010-11-14 18:14               ` Daniel Vetter
2010-11-14 18:19                 ` Sedat Dilek
2010-11-14 18:31                 ` Sedat Dilek
2010-11-14 18:54                   ` Daniel Vetter
2010-11-14 19:55                     ` Sedat Dilek
2010-11-15 10:31 Sedat Dilek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).