intel_th: Wait until port is in reset before programming it
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Mon, 21 Jun 2021 15:12:46 +0000 (18:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:17:51 +0000 (16:17 +0200)
commit524449a8bdcf2ae40aae02fb7a72db1d7daae5f8
treeeedf8d53f4a971e9a3cc3292b8d129a2cc15d240
parentda261750ec569b94389d1b77b632f4f5004aeca0
intel_th: Wait until port is in reset before programming it

[ Upstream commit ab1afed701d2db7eb35c1a2526a29067a38e93d1 ]

Some devices don't drain their pipelines if we don't make sure that
the corresponding output port is in reset before programming it for
a new trace capture, resulting in bits of old trace appearing in the
new trace capture. Fix that by explicitly making sure the reset is
asserted before programming new trace capture.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Link: https://lore.kernel.org/r/20210621151246.31891-5-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwtracing/intel_th/core.c
drivers/hwtracing/intel_th/gth.c
drivers/hwtracing/intel_th/intel_th.h