ARM: dts: msm: Modify bus vector for RNG client on msm8974

Modify the RNG (Random Number Generator) bus vector to use a different
originating master id, this change helps alleviate some slowdowns in boot
time noticed in targets where CPU is artificially bus throttled below a
threshold frequency.

Change-Id: Idf2a1d128f56e6aafebcbf0184ef2454d385be34
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
msm: msm_bus: Don't program bw regs in dual config

When in dual configuration mode, don't program the bw registers
since they are already programmed at boot up.

Change-Id: I74d559f997b6374df7b68ffd022aa6d36beb7a9d
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
ARM: dts: Reintroduce dual config for CPU on msm8974

Reintroduce the dual configuration mode for CPU masters on msm8974.
This will enable throttling of CPU in certain low bandwidth usecases
to alleviate timeline issues for other real time masters in the SOC.

Change-Id: Ic32f217ce40ee6ead4edd191811f9ce9f4e7e7ce
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
msm: msm_bus: Change priority overrides based on master configuration

When BIMC master enables BKE (in limiter mode), priority override
should be disabled since master is getting limited bandwidth.
However when BKE is disabled, make sure priority overrides are enabled
if master is in fixed mode.
Also enable the bke bit as part of switching QOS modes.

Change-Id: I318b3542f3f5da5685d5641701e0b6c8fc64732c
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
msm: kgsl: avoid zero length scatterlist allocation

During sglist allocation we calculate sglen as
per below

sglen_alloc = PAGE_ALIGN(size) >> PAGE_SHIFT;

sglen_alloc can be zero if size falls within the
last page. For example, when size = 0xFFFF_FF7B,
PAGE_ALIGN(0xFFFF_FF7B) will be 0, considering
0x1000 (4kb) PAGE_SIZE. if kzalloc() with
zero size, it will return ZERO_SIZE_PTR which is
not NULL and we always do NULL check. Dereferencing
ZERO_SIZE_PTR will lead to a distinct access fault.

Conflicts:
	drivers/gpu/msm/kgsl_sharedmem.h

Change-Id: Ibcc6198438c13b5111be0faa736328db92511597
CRs-Fixed: 563106
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
ARM: dts: msm8926: Add AB values to the GPU BIMC votes

At least a portion of the GPU's bus usage needs to be taken into
account on low end use cases to prevent underrun for other bus
users.  Add default votes to be taken into account in the BIMC
AB calculation.

Change-Id: I26068027087c0a177a4e0d6a2b15c8859af5c27f
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Merge "ARM: dts: msm: Modify bus vector for RNG client on msm8974"
Merge "msm: msm_bus: Don't program bw regs in dual config"
Merge "ARM: dts: Reintroduce dual config for CPU on msm8974"
Merge "msm: msm_bus: Change priority overrides based on master configuration"
Merge "ARM: dts: msm8926: Add AB values to the GPU BIMC votes"
Merge "msm: kgsl: avoid zero length scatterlist allocation"
msm: msm_bus: Changes for QOS computation at BIMC

Modify the computation of dynamic QOS parameters for BIMC. The bandwidth
paramter was incorrectly assumed to be in beats/s, it is infact in bytes/s
so there is no need to take bus width into account.
Also change resolution for statically prgrammed grant period to nano second
from micro second since each tick of the QOS clock is in the nano second
range.

Change-Id: Iad9ebc7837b769f8cd9c4215cb102f6916c0845d
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Merge "msm: msm_bus: Changes for QOS computation at BIMC"