[Openpvrsgx-devgroup] [PATCH 1/2] drm: pvrsgx: pvr-drv: Fix OCP handling with ioremap and reg access

Ivaylo Dimitrov ivo.g.dimitrov.75 at gmail.com
Sun Oct 24 20:33:07 CEST 2021

On 23.10.21 г. 13:12 ч., Tony Lindgren wrote:
> The OCP registers need to be configured for SGX on some omap variants
> to route the SGX interrupt. However, this must not be done on omap34xx
> as the OCP registers are not readable and reads will hang the system.
> We currently have pvr-drv hang on omap3430 devices like n900 because of
> trying read the OCP registers.
> We need to a combination of suitable ifdefs for each SoC for the OCP
> regs, but that's not a nice solution. Let's just start getting rid of
> the OCP related ifdefs and configure the OCP directly in the pvr-drv as
> needed. We just need to reconfigure the OCP registers in the runtime PM
> functions for now.
> Note that this still leaves SysClearInterrupts() doing a write to ack the
> OCP interrupt. However looks like the write won't do anything on omap34xx
> so we can leave it for now and remove it later when adding support for
> interrupt handling to pvr-drv.
> Also sgx_jz4780 also configures OCP regs, but I suspect that code never
> was enabled and was copied from earlier TI specific code. If sgx_jz4780
> really uses the OCP regs, it needs at least the ocp_base configured.
> Let's also add pvr_sgx_readl() and pvr_sgx_writel() while at it to make
> it easy to rewrite further features and make it clear that the OCP
> register area is SoC specific and separate from the SGX registers.
> Reported-by: Ivaylo Dimitrov <ivo.g.dimitrov.75 at gmail.com>
> Signed-off-by: Tony Lindgren <tony at atomide.com>

for omap3 (Nokia N900):
Tested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75 at gmail.com>

Thanks and regards,

More information about the openpvrsgx-devgroup mailing list