Some VMA struct fields need to be initialized once the VMA structure is
allocated.
Currently this only concerns anon_vma_chain field but some other will be
added to support the speculative page fault.
Instead of spreading the initialization calls all over the code, let's
introduce a dedicated inline function.
Change-Id: I9f6b29dc74055354318b548e2b6b22c37d4c61bb
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Patch-mainline: linux-mm @ Tue, 17 Apr 2018 16:33:13
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
[charante@codeaurora.org: merge conflict fixes]
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
pte_unmap_same() is making the assumption that the page table are still
around because the mmap_sem is held.
This is no more the case when running a speculative page fault and
additional check must be made to ensure that the final page table are still
there.
This is now done by calling pte_spinlock() to check for the VMA's
consistency while locking for the page tables.
This is requiring passing a vm_fault structure to pte_unmap_same() which is
containing all the needed parameters.
As pte_spinlock() may fail in the case of a speculative page fault, if the
VMA has been touched in our back, pte_unmap_same() should now return 3
cases :
1. pte are the same (0)
2. pte are different (VM_FAULT_PTNOTSAME)
3. a VMA's changes has been detected (VM_FAULT_RETRY)
The case 2 is handled by the introduction of a new VM_FAULT flag named
VM_FAULT_PTNOTSAME which is then trapped in cow_user_page().
If VM_FAULT_RETRY is returned, it is passed up to the callers to retry the
page fault while holding the mmap_sem.
Change-Id: Iaccfa0d877334f4343f8b0ec3400af5070ff5864
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Patch-mainline: linux-mm @ Tue, 17 Apr 2018 16:33:12
[vinmenon@codeaurora.org: trivial merge conflicts]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
When handling page fault without holding the mmap_sem the fetch of the
pte lock pointer and the locking will have to be done while ensuring
that the VMA is not touched in our back.
So move the fetch and locking operations in a dedicated function.
Change-Id: If93ab95b1d22b7195e1c15b57315021f6be7c394
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Patch-mainline: linux-mm @ Tue, 17 Apr 2018 16:33:11
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
When speculating faults (without holding mmap_sem) we need to validate
that the vma against which we loaded pages is still valid when we're
ready to install the new PTE.
Therefore, replace the pte_offset_map_lock() calls that (re)take the
PTL with pte_map_lock() which can fail in case we find the VMA changed
since we started the fault.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
[Port to 4.12 kernel]
[Remove the comment about the fault_env structure which has been
implemented as the vm_fault structure in the kernel]
[move pte_map_lock()'s definition upper in the file]
[move the define of FAULT_FLAG_SPECULATIVE later in the series]
[review error path in do_swap_page(), do_anonymous_page() and
wp_page_copy()]
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Change-Id: Id6dfae130fbfdd4bb92aa6415d6f1db7ef833266
[vinmenon@codeaurora.org: fix trivial merge conflicts]
Patch-mainline: linux-mm @ Tue, 17 Apr 2018 16:33:10
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Check for null pointer before deferencing the dev variable.
Change-Id: I4831defe74e6c3dfd6db16493fca202ca1319513
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
Several clock drivers initialize the clk_hw init element to a
local variable before calling [devm_]clk_hw_register() on it.
This style is fine. However, the init pointer value becomes
invalid as soon as the registration function returns. Clear
the init pointer to avoid the possibility of accessing an
invalid memory address after registration completes.
Change-Id: I3ae72c2c7ebc30e443c7034d072591827f4342aa
Signed-off-by: David Collins <collinsd@codeaurora.org>
This change enables partial update on BOE WQHD and FHD+
command mode panels for kona target.
Change-Id: Ic153780c424ae80d363c3e44126d0d5f90bb6bfd
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
This change adds support for dual panel on kona target.
Change-Id: Ic4d69fe8fabffb56aab1c42b78e8de1078956065
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Secondary panels should use the corresponding DSI CTRL, DSI PHY0 and
Clocks. This change allows the driver to choose the PHY, CTRL index
and clock names depending on the type of panel. The probe for secondary
display should not result a probe failure in cases when only one
panel is being used.
Change-Id: Ief0863c5d3310efdcea4a36b0ec5c640ffe3970e
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Currently for internal size calculation is disabled by using
AR50 as platform type. Change this to IRIS2. However, we still
want to disable this feature hence don't call this function
for both encoder and decoder.
Change-Id: I70b589c88c80b6263fbdeca8d0975d6eea1e8ae1
Signed-off-by: Vaibhav Deshu Venkatesh <vdeshuve@codeaurora.org>
Move the static metadata packets to an available generic SDP and
reserve the VSC extension SDP for dynamic metadata packets. The
payload for dynamic metadata comes from MEMPOOL and would
otherwise overwrite the static metadata payload. This change
ensures that both these distinct metadata packets are sent
correctly for every applicable frame.
Change-Id: Ifeb2e975ff9e7a1ce024fbdf5e72fa5422e9e709
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Validate the VSIF type code in the dynamic metadata payload and
adjust the payload data programmed in the memory pool to align
with the Infoframe SDP v1.3 VSIF packet type. Also reduce the
size of the static array used for caching payloads.
Change-Id: I33a7ace913c9903aeb02677722973edb2fc2739c
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Maximum usecase load supported in Kona is Decode 1080p@960fps.
CRs-Fixed: 2424420
Change-Id: I9759835431805a96ffb39d4adc30b2b6d8d10f9c
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Enable Content Protection feature for A650 GPU. This feature allows
the user to create secure memory and to put the GPU into secure mode.
Change-Id: I7845ccca9ec0d7c7f3d04e34802ebcc62295276b
Signed-off-by: Raghu Ananya Arabolu <rarabolu@codeaurora.org>
This change sets non fatal attribute for SDE iommus
as SDE driver prefer to handle the faults at later point
during frame done interrupt timeout.
Change-Id: I1988d554141dd02009414b8a49ce6c3826919284
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>