gpu: ion: Fix bug in zeroing pages in system heap

Pages are zeroed for security purposes when returned to the
ion heap.  There was a bug in this code preventing this
from happening.

Bug: 7573871
Change-Id: I79c22ee1da98f306199f3a192eaec4e81d5fd059
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
media: exynos: mfc: print some debug info in irq on invalid context

Change-Id: I5f857f2aad2c861ad26072555cfcfe217e618090
Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
gpu: ion: fix carveout ops

when using carveout heap ion_buffer_create function failed because
map_dma and unmap_dma operations aren't set by carveout heap.

Change-Id: I817bfad742abfab10b01d9b3d2e18bdf812a1307
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
gpu: ion: fix compilation warning

use atomic_read to get the refcount value to avoid compilation warning

Change-Id: I9bf0a07c787af8f87ac19314f996a78142f72f6b
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
media: exynos: mfc: reject suspend if the MFC is busy

This lifts the burden of trying to suspend/resume MFC and makes
the behavior a lot more deterministic.

Bug: 7261738
Change-Id: I7c09661d5001f9a8985bcc6ca52ec7ea38a66186
Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
media: exynos: mfc: don't drop wakeup source in multiple context case

Wakeup sources aren't ref counted, but we we always dropping ours in
release. If there were multiple contexts open, it would allow suspend
even though the MFC was still in use. Although, by itself, it's not a
problem, it did not have the intended effect.

Bug: 7261738
Change-Id: Id42006b2cff0e84711047a149a8654ed950f012a
Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
media: exynos: mfc: don't deref curr_ctx for dev-global irq reasons

Device-global interrupts (sleep/wake/status/init) can happen without
curr_ctx being valid. Specifically, this has happened when a sleep
request (called from s5p_mfc_suspsend()) immediately
follows a context being released. The driver doesn't reset curr_ctx
to an invalid value, so it is possible to have curr_ctx contain a
stale value when the device irqs are processed.

Ideally, the driver should be fixed to understand that curr_ctx
can have an invalid value, but there are a lot of references and
it would take a lot of time to audit them all and figure out which
situations warrant a check and which do not. It would also not be
a trivial and easily testable change.

So, instead, we isolate the irq reasons that do not rely on
current context being valid, and check them separately before
continuing to context-specific irq processing.

Bug: 7261738
Change-Id: I4eb557ae587b6287429776c98931e8fd096502ce
Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
gpu: mali-t6xx: remove dependency of specific board

Change-Id: I18f937b9a43535c7ec1edaaf37757edde563b033
Signed-off-by: Huisung Kang <hs1218.kang@samsung.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>