disp: msm: sde: register io resource collection VM event hook
Add support to read register ranges and IRQ lines that needs isolation during VM switch. Register for vm resource collection event providing the callback function. Change-Id: Ie1edf0794a8de89cc44279892433b45a54eba609 Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
bd60dce87c
commit
c3389d315c
@@ -52,6 +52,7 @@
|
||||
#include <linux/qcom_scm.h>
|
||||
#include "soc/qcom/secure_buffer.h"
|
||||
#include <linux/qtee_shmbridge.h>
|
||||
#include <linux/haven/hh_irq_lend.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include "sde_trace.h"
|
||||
@@ -3572,6 +3573,26 @@ power_error:
|
||||
return rc;
|
||||
}
|
||||
|
||||
int sde_kms_get_io_resources(struct sde_kms *sde_kms, struct msm_io_res *io_res)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(sde_kms->dev->dev);
|
||||
int rc = 0;
|
||||
|
||||
rc = msm_dss_get_io_mem(pdev, &io_res->mem);
|
||||
if (rc) {
|
||||
SDE_ERROR("failed to get io mem for KMS, rc = %d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = msm_dss_get_io_irq(pdev, &io_res->irq, HH_IRQ_LABEL_SDE);
|
||||
if (rc) {
|
||||
SDE_ERROR("failed to get io irq for KMS");
|
||||
return rc;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int sde_kms_hw_init(struct msm_kms *kms)
|
||||
{
|
||||
struct sde_kms *sde_kms;
|
||||
|
@@ -690,4 +690,12 @@ int sde_kms_handle_recovery(struct drm_encoder *encoder);
|
||||
*/
|
||||
void sde_kms_irq_enable_notify(struct sde_kms *sde_kms, bool enable);
|
||||
|
||||
/**
|
||||
* sde_kms_get_io_resources() - reads associated register range
|
||||
* @kms: pointer to sde_kms structure
|
||||
* @io_res: pointer to msm_io_res struct to populate the ranges
|
||||
* Return: error code.
|
||||
*/
|
||||
int sde_kms_get_io_resources(struct sde_kms *kms, struct msm_io_res *io_res);
|
||||
|
||||
#endif /* __sde_kms_H__ */
|
||||
|
Reference in New Issue
Block a user