[Intel-gfx] [PATCH 02/11] drm/i915: Introduce i915_gem_object_get_dma_address()

2016-05-30 Thread ankitprasad . r . sharma
From: Chris Wilson This utility function is a companion to i915_gem_object_get_page() that uses the same cached iterator for the scatterlist to perform fast sequential lookup of the dma address associated with any page within the object. Signed-off-by: Chris Wilson Signed-off-by: Ankitprasad Sh

[Intel-gfx] [PATCH 01/11] drm/i915: Add support for mapping an object page by page

2016-05-30 Thread ankitprasad . r . sharma
From: Chris Wilson Introduced a new vm specfic callback insert_page() to program a single pte in ggtt or ppgtt. This allows us to map a single page in to the mappable aperture space. This can be iterated over to access the whole object by using space as meagre as page size. v2: Added low level r

[Intel-gfx] [PATCH 05/11] drm/i915: Support for creating Stolen memory backed objects

2016-05-30 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Extend the drm_i915_gem_create structure to add support for creating Stolen memory backed objects. Added a new flag through which user can specify the preference to allocate the object from stolen memory, which if set, an attempt will be made to allocate the object from s

[Intel-gfx] [PATCH v20 00/11] Support for creating/using Stolen memory backed objects

2016-05-30 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch series adds support for creating/using Stolen memory backed objects. Despite being a unified memory architecture (UMA) some bits of memory are more equal than others. In particular we have the thorny issue of stolen memory, memory stolen from the system by the

[Intel-gfx] [PATCH 08/11] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2016-05-30 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover objects backed by stolen memory as well as other non-shmem backed objects. v2: Drop locks around slow_user

[Intel-gfx] [PATCH 07/11] drm/i915: Add support for stealing purgable stolen pages

2016-05-30 Thread ankitprasad . r . sharma
From: Chris Wilson If we run out of stolen memory when trying to allocate an object, see if we can reap enough purgeable objects to free up enough contiguous free space for the allocation. This is in principle very much like evicting objects to free up enough contiguous space in the vma when bind

[Intel-gfx] [PATCH 09/11] drm/i915: Migrate stolen objects before hibernation

2016-05-30 Thread ankitprasad . r . sharma
From: Chris Wilson Ville reminded us that stolen memory is not preserved across hibernation, and a result of this was that context objects now being allocated from stolen were being corrupted on S4 and promptly hanging the GPU on resume. We want to utilise stolen for as much as possible (nothing

[Intel-gfx] [PATCH 10/11] drm/i915: Disable use of stolen area by User when Intel RST is present

2016-05-30 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma The BIOS RapidStartTechnology may corrupt the stolen memory across S3 suspend due to unalarmed hibernation, in which case we will not be able to preserve the User data stored in the stolen region. Hence this patch tries to identify presence of the RST device on the ACPI b

[Intel-gfx] [PATCH 11/11] drm/i915: Extend GET_APERTURE ioctl to report available map space

2016-05-30 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma When constructing a batchbuffer, it is sometimes crucial to know the largest hole into which we can fit a fenceable buffer (for example when handling very large objects on gen2 and gen3). This depends on the fragmentation of pinned buffers inside the aperture, a question

[Intel-gfx] [PATCH 04/11] drm/i915: Clearing buffer objects via CPU/GTT

2016-05-30 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc for i915_gem_clear_object(), corre

[Intel-gfx] [PATCH 06/11] drm/i915: Propagating correct error codes to the userspace

2016-05-30 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Propagating correct error codes to userspace by using ERR_PTR and PTR_ERR macros for stolen memory based object allocation. We generally return -ENOMEM to the user whenever there is a failure in object allocation. This patch helps user to identify the correct reason for t

[Intel-gfx] [PATCH 03/11] drm/i915: Use insert_page for pwrite_fast

2016-05-30 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma In pwrite_fast, map an object page by page if obj_ggtt_pin fails. First, we try a nonblocking pin for the whole object (since that is fastest if reused), then failing that we try to grab one page in the mappable aperture. It also allows us to handle objects larger than th

[Intel-gfx] [PATCH 1/3] igt/gem_stolen: Verify contents of stolen-backed objects across hibernation

2016-06-03 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch verifies if the contents of the stolen backed object were preserved across hibernation. This is to validate kernel changes related to moving stolen-backed objects to shmem on hibernation. v2: Added comment, Use igt_assert_eq() instead of igt_assert(), Made loo

[Intel-gfx] [PATCH 3/3] igt/gem_stolen: Check for available stolen memory size

2016-06-03 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Check for available stolen memory size before attempting to run the stolen memory tests. This way we make sure that we do not create objects from stolen memory without knowing the available size. This checks if the kernel supports creation of stolen backed objects before

[Intel-gfx] [PATCH 2/3] igt/gem_stolen: Fix for no_mmap subtest

2016-06-03 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma no_mmap subtest is expected to fail, but calling gem_mmap__cpu will assert the returned value itself, which makes test fail. Replacing gem_mmap__cpu by __gem_mmap__cpu and checking the returned value. Signed-off-by: Ankitprasad Sharma --- tests/gem_stolen.c | 2 +- 1 f

[Intel-gfx] [PATCH 1/3] igt/gem_stolen: Verify contents of stolen-backed objects across hibernation

2016-06-06 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch verifies if the contents of the stolen backed object were preserved across hibernation. This is to validate kernel changes related to moving stolen-backed objects to shmem on hibernation. v2: Added comment, Use igt_assert_eq() instead of igt_assert(), Made loo

[Intel-gfx] [PATCH] igt/gem_stolen: Check for available stolen memory size

2016-06-06 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Check for available stolen memory size before attempting to run the stolen memory tests. This way we make sure that we do not create objects from stolen memory without knowing the available size. This checks if the kernel supports creation of stolen backed objects before

[Intel-gfx] [PATCH v21 00/11] Support for creating/using Stolen memory backed objects

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch series adds support for creating/using Stolen memory backed objects. Despite being a unified memory architecture (UMA) some bits of memory are more equal than others. In particular we have the thorny issue of stolen memory, memory stolen from the system by the

[Intel-gfx] [PATCH 01/11] drm/i915: Add support for mapping an object page by page

2016-06-08 Thread ankitprasad . r . sharma
From: Chris Wilson Introduced a new vm specfic callback insert_page() to program a single pte in ggtt or ppgtt. This allows us to map a single page in to the mappable aperture space. This can be iterated over to access the whole object by using space as meagre as page size. v2: Added low level r

[Intel-gfx] [PATCH 09/11] drm/i915: Migrate stolen objects before hibernation

2016-06-08 Thread ankitprasad . r . sharma
From: Chris Wilson Ville reminded us that stolen memory is not preserved across hibernation, and a result of this was that context objects now being allocated from stolen were being corrupted on S4 and promptly hanging the GPU on resume. We want to utilise stolen for as much as possible (nothing

[Intel-gfx] [PATCH 10/11] drm/i915: Disable use of stolen area by User when Intel RST is present

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma The BIOS RapidStartTechnology may corrupt the stolen memory across S3 suspend due to unalarmed hibernation, in which case we will not be able to preserve the User data stored in the stolen region. Hence this patch tries to identify presence of the RST device on the ACPI b

[Intel-gfx] [PATCH 02/11] drm/i915: Introduce i915_gem_object_get_dma_address()

2016-06-08 Thread ankitprasad . r . sharma
From: Chris Wilson This utility function is a companion to i915_gem_object_get_page() that uses the same cached iterator for the scatterlist to perform fast sequential lookup of the dma address associated with any page within the object. Signed-off-by: Chris Wilson Signed-off-by: Ankitprasad Sh

[Intel-gfx] [PATCH 05/11] drm/i915: Support for creating Stolen memory backed objects

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Extend the drm_i915_gem_create structure to add support for creating Stolen memory backed objects. Added a new flag through which user can specify the preference to allocate the object from stolen memory, which if set, an attempt will be made to allocate the object from s

[Intel-gfx] [PATCH 03/11] drm/i915: Use insert_page for pwrite_fast

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma In pwrite_fast, map an object page by page if obj_ggtt_pin fails. First, we try a nonblocking pin for the whole object (since that is fastest if reused), then failing that we try to grab one page in the mappable aperture. It also allows us to handle objects larger than th

[Intel-gfx] [PATCH 04/11] drm/i915: Clearing buffer objects via CPU/GTT

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc for i915_gem_clear_object(), corre

[Intel-gfx] [PATCH 07/11] drm/i915: Add support for stealing purgable stolen pages

2016-06-08 Thread ankitprasad . r . sharma
From: Chris Wilson If we run out of stolen memory when trying to allocate an object, see if we can reap enough purgeable objects to free up enough contiguous free space for the allocation. This is in principle very much like evicting objects to free up enough contiguous space in the vma when bind

[Intel-gfx] [PATCH 11/11] drm/i915: Extend GET_APERTURE ioctl to report available map space

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma When constructing a batchbuffer, it is sometimes crucial to know the largest hole into which we can fit a fenceable buffer (for example when handling very large objects on gen2 and gen3). This depends on the fragmentation of pinned buffers inside the aperture, a question

[Intel-gfx] [PATCH 08/11] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover objects backed by stolen memory as well as other non-shmem backed objects. v2: Drop locks around slow_user

[Intel-gfx] [PATCH 06/11] drm/i915: Propagating correct error codes to the userspace

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Propagating correct error codes to userspace by using ERR_PTR and PTR_ERR macros for stolen memory based object allocation. We generally return -ENOMEM to the user whenever there is a failure in object allocation. This patch helps user to identify the correct reason for t

[Intel-gfx] [PATCH 03/11] drm/i915: Use insert_page for pwrite_fast

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma In pwrite_fast, map an object page by page if obj_ggtt_pin fails. First, we try a nonblocking pin for the whole object (since that is fastest if reused), then failing that we try to grab one page in the mappable aperture. It also allows us to handle objects larger than th

[Intel-gfx] [PATCH 01/11] drm/i915: Add support for mapping an object page by page

2016-06-08 Thread ankitprasad . r . sharma
From: Chris Wilson Introduced a new vm specfic callback insert_page() to program a single pte in ggtt or ppgtt. This allows us to map a single page in to the mappable aperture space. This can be iterated over to access the whole object by using space as meagre as page size. v2: Added low level r

[Intel-gfx] [PATCH v22 00/11] Support for creating/using Stolen memory backed objects

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch series adds support for creating/using Stolen memory backed objects. Despite being a unified memory architecture (UMA) some bits of memory are more equal than others. In particular we have the thorny issue of stolen memory, memory stolen from the system by the

[Intel-gfx] [PATCH 07/11] drm/i915: Add support for stealing purgable stolen pages

2016-06-08 Thread ankitprasad . r . sharma
From: Chris Wilson If we run out of stolen memory when trying to allocate an object, see if we can reap enough purgeable objects to free up enough contiguous free space for the allocation. This is in principle very much like evicting objects to free up enough contiguous space in the vma when bind

[Intel-gfx] [PATCH 05/11] drm/i915: Support for creating Stolen memory backed objects

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Extend the drm_i915_gem_create structure to add support for creating Stolen memory backed objects. Added a new flag through which user can specify the preference to allocate the object from stolen memory, which if set, an attempt will be made to allocate the object from s

[Intel-gfx] [PATCH 06/11] drm/i915: Propagating correct error codes to the userspace

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Propagating correct error codes to userspace by using ERR_PTR and PTR_ERR macros for stolen memory based object allocation. We generally return -ENOMEM to the user whenever there is a failure in object allocation. This patch helps user to identify the correct reason for t

[Intel-gfx] [PATCH 04/11] drm/i915: Clearing buffer objects via CPU/GTT

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc for i915_gem_clear_object(), corre

[Intel-gfx] [PATCH 02/11] drm/i915: Introduce i915_gem_object_get_dma_address()

2016-06-08 Thread ankitprasad . r . sharma
From: Chris Wilson This utility function is a companion to i915_gem_object_get_page() that uses the same cached iterator for the scatterlist to perform fast sequential lookup of the dma address associated with any page within the object. Signed-off-by: Chris Wilson Signed-off-by: Ankitprasad Sh

[Intel-gfx] [PATCH 08/11] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover objects backed by stolen memory as well as other non-shmem backed objects. v2: Drop locks around slow_user

[Intel-gfx] [PATCH 09/11] drm/i915: Migrate stolen objects before hibernation

2016-06-08 Thread ankitprasad . r . sharma
From: Chris Wilson Ville reminded us that stolen memory is not preserved across hibernation, and a result of this was that context objects now being allocated from stolen were being corrupted on S4 and promptly hanging the GPU on resume. We want to utilise stolen for as much as possible (nothing

[Intel-gfx] [PATCH 10/11] drm/i915: Disable use of stolen area by User when Intel RST is present

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma The BIOS RapidStartTechnology may corrupt the stolen memory across S3 suspend due to unalarmed hibernation, in which case we will not be able to preserve the User data stored in the stolen region. Hence this patch tries to identify presence of the RST device on the ACPI b

[Intel-gfx] [PATCH 11/11] drm/i915: Extend GET_APERTURE ioctl to report available map space

2016-06-08 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma When constructing a batchbuffer, it is sometimes crucial to know the largest hole into which we can fit a fenceable buffer (for example when handling very large objects on gen2 and gen3). This depends on the fragmentation of pinned buffers inside the aperture, a question

[Intel-gfx] [PATCH 1/5] drm/i915: Add support for mapping an object page by page

2016-06-10 Thread ankitprasad . r . sharma
From: Chris Wilson Introduced a new vm specfic callback insert_page() to program a single pte in ggtt or ppgtt. This allows us to map a single page in to the mappable aperture space. This can be iterated over to access the whole object by using space as meagre as page size. v2: Added low level r

[Intel-gfx] [PATCH 3/5] drm/i915: Use insert_page for pwrite_fast

2016-06-10 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma In pwrite_fast, map an object page by page if obj_ggtt_pin fails. First, we try a nonblocking pin for the whole object (since that is fastest if reused), then failing that we try to grab one page in the mappable aperture. It also allows us to handle objects larger than th

[Intel-gfx] [PATCH 2/5] drm/i915: Introduce i915_gem_object_get_dma_address()

2016-06-10 Thread ankitprasad . r . sharma
From: Chris Wilson This utility function is a companion to i915_gem_object_get_page() that uses the same cached iterator for the scatterlist to perform fast sequential lookup of the dma address associated with any page within the object. Signed-off-by: Chris Wilson Signed-off-by: Ankitprasad Sh

[Intel-gfx] [PATCH 4/5] drm/i915: Clearing buffer objects via CPU/GTT

2016-06-10 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc for i915_gem_clear_object(), corre

[Intel-gfx] [PATCH 5/5] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2016-06-10 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover objects backed by stolen memory as well as other non-shmem backed objects. v2: Drop locks around slow_user

[Intel-gfx] [PATCH v4 0/3] Tests for verifying the old and extended GEM_CREATE ioctl

2015-12-02 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This new set of tests verifies the old and the new extended GEM_CREATE ioctl gem_stolen tries to verify the new extended GEM_CREATE ioctl, which tries to create an object backed by stolen memory and performs basic operations on it. It verifies the creation as well as the

[Intel-gfx] [PATCH 2/4] igt/gem_pread: Support to verify pread/pwrite for non-shmem backed obj

2015-12-02 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support to verify pread/pwrite for non-shmem backed objects. It also shows the pread/pwrite speed. It also tests speeds for pread with and without user side page faults v2: Fixed Rebase conflicts (Ankit) v3: Precalculating values to avoid redundant funct

[Intel-gfx] [PATCH 1/4] igt/gem_stolen: Verifying extended gem_create ioctl

2015-12-02 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds the testcases for verifying the new extended gem_create ioctl. By means of this extended ioctl, memory placement of the GEM object can be specified, i.e. either shmem or stolen memory. These testcases include functional tests and interface tests for testin

[Intel-gfx] [PATCH 3/4] igt/gem_create: Test to validate parameters for GEM_CREATE ioctl

2015-12-02 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This test validates the two parameters (size and flags) GEM_CREATE ioctl. v2: Added IGT_TEST_DESCRIPTION (Thomas Wood) v3: Removed use of hard coded values, updated comments (Tvrtko) v4: Removed over-use of macros, updated with multiples of PAGE_SIZE (Tvrtko) Signed-o

[Intel-gfx] [PATCH 4/4] igt/gem_stolen: Verify contents of stolen-backed objects across hibernation

2015-12-02 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch verifies if the contents of the stolen backed object were preserved across hibernation. This is to validate kernel changes related to moving stolen-backed objects to shmem on hibernation. Signed-off-by: Ankitprasad Sharma --- tests/gem_stolen.c | 86

[Intel-gfx] [PATCH 1/6] drm/i915: Clearing buffer objects via CPU/GTT

2015-12-09 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc for i915_gem_clear_object(), corre

[Intel-gfx] [PATCH 4/6] drm/i915: Add support for stealing purgable stolen pages

2015-12-09 Thread ankitprasad . r . sharma
From: Chris Wilson If we run out of stolen memory when trying to allocate an object, see if we can reap enough purgeable objects to free up enough contiguous free space for the allocation. This is in principle very much like evicting objects to free up enough contiguous space in the vma when bind

[Intel-gfx] [PATCH 3/6] drm/i915: Propagating correct error codes to the userspace

2015-12-09 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Propagating correct error codes to userspace by using ERR_PTR and PTR_ERR macros for stolen memory based object allocation. We generally return -ENOMEM to the user whenever there is a failure in object allocation. This patch helps user to identify the correct reason for t

[Intel-gfx] [PATCH 2/6] drm/i915: Support for creating Stolen memory backed objects

2015-12-09 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Extend the drm_i915_gem_create structure to add support for creating Stolen memory backed objects. Added a new flag through which user can specify the preference to allocate the object from stolen memory, which if set, an attempt will be made to allocate the object from s

[Intel-gfx] [PATCH v10 0/6] Support for creating/using Stolen memory backed objects

2015-12-09 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch series adds support for creating/using Stolen memory backed objects. Despite being a unified memory architecture (UMA) some bits of memory are more equal than others. In particular we have the thorny issue of stolen memory, memory stolen from the system by the

[Intel-gfx] [PATCH 5/6] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-12-09 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover objects backed by stolen memory as well as other non-shmem backed objects. v2: Drop locks around slow_user

[Intel-gfx] [PATCH 6/6] drm/i915: Migrate stolen objects before hibernation

2015-12-09 Thread ankitprasad . r . sharma
From: Chris Wilson Ville reminded us that stolen memory is not preserved across hibernation, and a result of this was that context objects now being allocated from stolen were being corrupted on S4 and promptly hanging the GPU on resume. We want to utilise stolen for as much as possible (nothing

[Intel-gfx] [PATCH 5/9] drm/i915: Propagating correct error codes to the userspace

2015-12-13 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Propagating correct error codes to userspace by using ERR_PTR and PTR_ERR macros for stolen memory based object allocation. We generally return -ENOMEM to the user whenever there is a failure in object allocation. This patch helps user to identify the correct reason for t

[Intel-gfx] [PATCH 2/9] drm/i915: Use insert_page for pwrite_fast

2015-12-13 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma In pwrite_fast, map an object page by page if obj_ggtt_pin fails. First, we try a nonblocking pin for the whole object (since that is fastest if reused), then failing that we try to grab one page in the mappable aperture. It also allows us to handle objects larger than th

[Intel-gfx] [PATCH 8/9] drm/i915: Migrate stolen objects before hibernation

2015-12-13 Thread ankitprasad . r . sharma
From: Chris Wilson Ville reminded us that stolen memory is not preserved across hibernation, and a result of this was that context objects now being allocated from stolen were being corrupted on S4 and promptly hanging the GPU on resume. We want to utilise stolen for as much as possible (nothing

[Intel-gfx] [PATCH 9/9] drm/i915: Fail the execbuff using stolen objects as batchbuffers

2015-12-13 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Using stolen backed objects as a batchbuffer may result into a kernel panic during relocation. Added a check to prevent the panic and fail the execbuffer call. It is not recommended to use stolen object as a batchbuffer. Signed-off-by: Ankitprasad Sharma --- drivers/gp

[Intel-gfx] [PATCH 7/9] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-12-13 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover objects backed by stolen memory as well as other non-shmem backed objects. v2: Drop locks around slow_user

[Intel-gfx] [PATCH 4/9] drm/i915: Support for creating Stolen memory backed objects

2015-12-13 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Extend the drm_i915_gem_create structure to add support for creating Stolen memory backed objects. Added a new flag through which user can specify the preference to allocate the object from stolen memory, which if set, an attempt will be made to allocate the object from s

[Intel-gfx] [PATCH 3/9] drm/i915: Clearing buffer objects via CPU/GTT

2015-12-13 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc for i915_gem_clear_object(), corre

[Intel-gfx] [PATCH 1/9] drm/i915: Allow use of get_dma_address for stolen backed objects

2015-12-13 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma i915_gem_object_get_dma_address function is used to retrieve the dma address of a particular page so as to map it in a given GTT entry for CPU access. This function would be used for stolen backed objects also for tasks like pwrite, clearing of the pages etc. So the obj-

[Intel-gfx] [PATCH v11 0/9] Support for creating/using Stolen memory backed objects

2015-12-13 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch series adds support for creating/using Stolen memory backed objects. Despite being a unified memory architecture (UMA) some bits of memory are more equal than others. In particular we have the thorny issue of stolen memory, memory stolen from the system by the

[Intel-gfx] [PATCH 6/9] drm/i915: Add support for stealing purgable stolen pages

2015-12-13 Thread ankitprasad . r . sharma
From: Chris Wilson If we run out of stolen memory when trying to allocate an object, see if we can reap enough purgeable objects to free up enough contiguous free space for the allocation. This is in principle very much like evicting objects to free up enough contiguous space in the vma when bind

[Intel-gfx] [PATCH 1/8] drm/i915: Allow use of get_dma_address for stolen backed objects

2015-12-15 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma i915_gem_object_get_dma_address function is used to retrieve the dma address of a particular page so as to map it in a given GTT entry for CPU access. This function would be used for stolen backed objects also for tasks like pwrite, clearing of the pages etc. So the obj-

[Intel-gfx] [PATCH 6/8] drm/i915: Add support for stealing purgable stolen pages

2015-12-15 Thread ankitprasad . r . sharma
From: Chris Wilson If we run out of stolen memory when trying to allocate an object, see if we can reap enough purgeable objects to free up enough contiguous free space for the allocation. This is in principle very much like evicting objects to free up enough contiguous space in the vma when bind

[Intel-gfx] [PATCH 3/8] drm/i915: Clearing buffer objects via CPU/GTT

2015-12-15 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc for i915_gem_clear_object(), corre

[Intel-gfx] [PATCH 2/8] drm/i915: Use insert_page for pwrite_fast

2015-12-15 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma In pwrite_fast, map an object page by page if obj_ggtt_pin fails. First, we try a nonblocking pin for the whole object (since that is fastest if reused), then failing that we try to grab one page in the mappable aperture. It also allows us to handle objects larger than th

[Intel-gfx] [PATCH 4/8] drm/i915: Support for creating Stolen memory backed objects

2015-12-15 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Extend the drm_i915_gem_create structure to add support for creating Stolen memory backed objects. Added a new flag through which user can specify the preference to allocate the object from stolen memory, which if set, an attempt will be made to allocate the object from s

[Intel-gfx] [PATCH 8/8] drm/i915: Migrate stolen objects before hibernation

2015-12-15 Thread ankitprasad . r . sharma
From: Chris Wilson Ville reminded us that stolen memory is not preserved across hibernation, and a result of this was that context objects now being allocated from stolen were being corrupted on S4 and promptly hanging the GPU on resume. We want to utilise stolen for as much as possible (nothing

[Intel-gfx] [PATCH v12 0/8] Support for creating/using Stolen memory backed objects

2015-12-15 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch series adds support for creating/using Stolen memory backed objects. Despite being a unified memory architecture (UMA) some bits of memory are more equal than others. In particular we have the thorny issue of stolen memory, memory stolen from the system by the

[Intel-gfx] [PATCH 5/8] drm/i915: Propagating correct error codes to the userspace

2015-12-15 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Propagating correct error codes to userspace by using ERR_PTR and PTR_ERR macros for stolen memory based object allocation. We generally return -ENOMEM to the user whenever there is a failure in object allocation. This patch helps user to identify the correct reason for t

[Intel-gfx] [PATCH 7/8] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-12-15 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover objects backed by stolen memory as well as other non-shmem backed objects. v2: Drop locks around slow_user

[Intel-gfx] [PATCH 10/10] drm/i915: Disable use of stolen area by User when Intel RST is present

2016-02-04 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma The BIOS RapidStartTechnology may corrupt the stolen memory across S3 suspend due to unalarmed hibernation, in which case we will not be able to preserve the User data stored in the stolen region. Hence this patch tries to identify presence of the RST device on the ACPI b

[Intel-gfx] [PATCH 09/10] drm/i915: Migrate stolen objects before hibernation

2016-02-04 Thread ankitprasad . r . sharma
From: Chris Wilson Ville reminded us that stolen memory is not preserved across hibernation, and a result of this was that context objects now being allocated from stolen were being corrupted on S4 and promptly hanging the GPU on resume. We want to utilise stolen for as much as possible (nothing

[Intel-gfx] [PATCH 01/10] drm/i915: Add support for mapping an object page by page

2016-02-04 Thread ankitprasad . r . sharma
From: Chris Wilson Introduced a new vm specfic callback insert_page() to program a single pte in ggtt or ppgtt. This allows us to map a single page in to the mappable aperture space. This can be iterated over to access the whole object by using space as meagre as page size. v2: Added low level r

[Intel-gfx] [PATCH 07/10] drm/i915: Add support for stealing purgable stolen pages

2016-02-04 Thread ankitprasad . r . sharma
From: Chris Wilson If we run out of stolen memory when trying to allocate an object, see if we can reap enough purgeable objects to free up enough contiguous free space for the allocation. This is in principle very much like evicting objects to free up enough contiguous space in the vma when bind

[Intel-gfx] [PATCH 08/10] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2016-02-04 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover objects backed by stolen memory as well as other non-shmem backed objects. v2: Drop locks around slow_user

[Intel-gfx] [PATCH 05/10] drm/i915: Support for creating Stolen memory backed objects

2016-02-04 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Extend the drm_i915_gem_create structure to add support for creating Stolen memory backed objects. Added a new flag through which user can specify the preference to allocate the object from stolen memory, which if set, an attempt will be made to allocate the object from s

[Intel-gfx] [PATCH 03/10] drm/i915: Use insert_page for pwrite_fast

2016-02-04 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma In pwrite_fast, map an object page by page if obj_ggtt_pin fails. First, we try a nonblocking pin for the whole object (since that is fastest if reused), then failing that we try to grab one page in the mappable aperture. It also allows us to handle objects larger than th

[Intel-gfx] [PATCH 02/10] drm/i915: Introduce i915_gem_object_get_dma_address()

2016-02-04 Thread ankitprasad . r . sharma
From: Chris Wilson This utility function is a companion to i915_gem_object_get_page() that uses the same cached iterator for the scatterlist to perform fast sequential lookup of the dma address associated with any page within the object. Signed-off-by: Chris Wilson Signed-off-by: Ankitprasad Sh

[Intel-gfx] [PATCH 04/10] drm/i915: Clearing buffer objects via CPU/GTT

2016-02-04 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc for i915_gem_clear_object(), corre

[Intel-gfx] [PATCH v16 0/10] Support for creating/using Stolen memory backed objects

2016-02-04 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch series adds support for creating/using Stolen memory backed objects. Despite being a unified memory architecture (UMA) some bits of memory are more equal than others. In particular we have the thorny issue of stolen memory, memory stolen from the system by the

[Intel-gfx] [PATCH 06/10] drm/i915: Propagating correct error codes to the userspace

2016-02-04 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Propagating correct error codes to userspace by using ERR_PTR and PTR_ERR macros for stolen memory based object allocation. We generally return -ENOMEM to the user whenever there is a failure in object allocation. This patch helps user to identify the correct reason for t

[Intel-gfx] [PATCH] drm/i915: Add RPS debugfs disabling for gen6+ platforms

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch exposes a new debugfs interface 'i915_rps_disable' Following 2 values shall be echoed into this file. '0' - RPS explicitly enabled . '1' - RPS explicitly disabled. This interface provides capabilty to enable/disable Turbo feature at runtime, which is needed fo

[Intel-gfx] [PATCH 07/10] drm/i915: Add support for stealing purgable stolen pages

2016-02-18 Thread ankitprasad . r . sharma
From: Chris Wilson If we run out of stolen memory when trying to allocate an object, see if we can reap enough purgeable objects to free up enough contiguous free space for the allocation. This is in principle very much like evicting objects to free up enough contiguous space in the vma when bind

[Intel-gfx] [PATCH 02/10] drm/i915: Introduce i915_gem_object_get_dma_address()

2016-02-18 Thread ankitprasad . r . sharma
From: Chris Wilson This utility function is a companion to i915_gem_object_get_page() that uses the same cached iterator for the scatterlist to perform fast sequential lookup of the dma address associated with any page within the object. Signed-off-by: Chris Wilson Signed-off-by: Ankitprasad Sh

[Intel-gfx] [PATCH 01/10] drm/i915: Add support for mapping an object page by page

2016-02-18 Thread ankitprasad . r . sharma
From: Chris Wilson Introduced a new vm specfic callback insert_page() to program a single pte in ggtt or ppgtt. This allows us to map a single page in to the mappable aperture space. This can be iterated over to access the whole object by using space as meagre as page size. v2: Added low level r

[Intel-gfx] [PATCH 03/10] drm/i915: Use insert_page for pwrite_fast

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma In pwrite_fast, map an object page by page if obj_ggtt_pin fails. First, we try a nonblocking pin for the whole object (since that is fastest if reused), then failing that we try to grab one page in the mappable aperture. It also allows us to handle objects larger than th

[Intel-gfx] [PATCH v17 0/10] Support for creating/using Stolen memory backed objects

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch series adds support for creating/using Stolen memory backed objects. Despite being a unified memory architecture (UMA) some bits of memory are more equal than others. In particular we have the thorny issue of stolen memory, memory stolen from the system by the

[Intel-gfx] [PATCH 06/10] drm/i915: Propagating correct error codes to the userspace

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Propagating correct error codes to userspace by using ERR_PTR and PTR_ERR macros for stolen memory based object allocation. We generally return -ENOMEM to the user whenever there is a failure in object allocation. This patch helps user to identify the correct reason for t

[Intel-gfx] [PATCH 08/10] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover objects backed by stolen memory as well as other non-shmem backed objects. v2: Drop locks around slow_user

[Intel-gfx] [PATCH 05/10] drm/i915: Support for creating Stolen memory backed objects

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Extend the drm_i915_gem_create structure to add support for creating Stolen memory backed objects. Added a new flag through which user can specify the preference to allocate the object from stolen memory, which if set, an attempt will be made to allocate the object from s

[Intel-gfx] [PATCH 04/10] drm/i915: Clearing buffer objects via CPU/GTT

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc for i915_gem_clear_object(), corre

[Intel-gfx] [PATCH 10/10] drm/i915: Disable use of stolen area by User when Intel RST is present

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma The BIOS RapidStartTechnology may corrupt the stolen memory across S3 suspend due to unalarmed hibernation, in which case we will not be able to preserve the User data stored in the stolen region. Hence this patch tries to identify presence of the RST device on the ACPI b

[Intel-gfx] [PATCH 09/10] drm/i915: Migrate stolen objects before hibernation

2016-02-18 Thread ankitprasad . r . sharma
From: Chris Wilson Ville reminded us that stolen memory is not preserved across hibernation, and a result of this was that context objects now being allocated from stolen were being corrupted on S4 and promptly hanging the GPU on resume. We want to utilise stolen for as much as possible (nothing

  1   2   3   >