Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b30e4ad authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: check intr line status before handling isr"

parents 5dbeb573 d3b3f4c3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -497,6 +497,7 @@ struct mdss_util_intf {
};

struct mdss_util_intf *mdss_get_util_intf(void);
bool mdss_get_irq_enable_state(struct mdss_hw *hw);

static inline int mdss_get_sd_client_cnt(void)
{
+5 −1
Original line number Diff line number Diff line
@@ -176,10 +176,14 @@ u32 mdss_mdp_fb_stride(u32 fb_index, u32 xres, int bpp)
static irqreturn_t mdss_irq_handler(int irq, void *ptr)
{
	struct mdss_data_type *mdata = ptr;
	u32 intr = MDSS_REG_READ(mdata, MDSS_REG_HW_INTR_STATUS);
	u32 intr;

	if (!mdata)
		return IRQ_NONE;
	else if (!mdss_get_irq_enable_state(&mdss_mdp_hw))
		return IRQ_HANDLED;

	intr = MDSS_REG_READ(mdata, MDSS_REG_HW_INTR_STATUS);

	mdss_mdp_hw.irq_info->irq_buzy = true;

+13 −1
Original line number Diff line number Diff line

/* Copyright (c) 2007-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2007-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -160,3 +160,15 @@ struct mdss_util_intf *mdss_get_util_intf()
	return &mdss_util;
}
EXPORT_SYMBOL(mdss_get_util_intf);

/* This routine should only be called from interrupt context */
bool mdss_get_irq_enable_state(struct mdss_hw *hw)
{
	bool is_irq_enabled;

	spin_lock(&mdss_lock);
	is_irq_enabled = hw->irq_info->irq_ena;
	spin_unlock(&mdss_lock);

	return is_irq_enabled;
}