Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2956183imu; Mon, 19 Nov 2018 08:35:42 -0800 (PST) X-Google-Smtp-Source: AJdET5d1h0kunZtzcSTvDGd1ZhdhiZ1dcQoFCnAnKBK/3XVmxj3+O/GoZoSBgU35ioVwd2R0sQUh X-Received: by 2002:a62:dec3:: with SMTP id h186mr20647491pfg.158.1542645342679; Mon, 19 Nov 2018 08:35:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645342; cv=none; d=google.com; s=arc-20160816; b=NXHUJBYzhCk0TEgNHg+8JiZukiT786/ii+VCTtHO4OScs/ajgVd0MiWSXbVKG8t9SM Kj26QPsmAypEKKSCDjeiR6IAtwu9tEs3Jxj4JTsFI2+dvliLa+P1dAThw7RM8o5Hj+s8 896QWj0EARkj3noXEkg+H54X9E52VU/5+xeGA4ixLlU4Qj5q1Px5NfZ74Cn3cU1AJg9m QHLjrV/WN4hxJ8Wm/v5ZnniMu4wKkGDPXWzlCTHEuhUn+md0Ipu2DiV+3PePUcSVJ82Z roXGfoYWOKDKJ1vBQ8xwqth99kXIXBWmuiSIiF+XNRKunDmectepIGi3dUBfUFeg2zv5 Kc5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JfJzgxbt1UeEzjBlqezuTfWUDyMsq5XuzzLi81NgCqY=; b=mS13PJ8qMLjjTlwk40Lt+oZdHu5SDJkaCnR+TFZaKp9trw/GtfcbzNHxNgMRTn+PpZ AqjNbDfd4q8rq8lqZH8NqLYwPdAK7Oi/qfdATeW8EnnWuboYROyP/Ihw7fpgf+2AEwb8 +XN4aEk+xvJls0Hy7eZL4whZETvNHDM4C/Yj5LBJiCRWnamZIts54KB4mqPPn4i3LJOd C4+8IzUq6HuV3YUWqxG4kaf/cRxBptSIzhaR48/OpJH+XQjdn0XkHwIJFfMGOJJNEpGl VgX/zputFNwujhEpJS2kTMpHP7cOIN7/vwbpUI5lN1eKqPdS0ZUR25MOJnVffK7KAG0t TiHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0SVdr1My; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q61-v6si40523759plb.418.2018.11.19.08.35.14; Mon, 19 Nov 2018 08:35:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0SVdr1My; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730905AbeKTC4y (ORCPT + 99 others); Mon, 19 Nov 2018 21:56:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:55262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730885AbeKTC4y (ORCPT ); Mon, 19 Nov 2018 21:56:54 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4FADB20831; Mon, 19 Nov 2018 16:32:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645166; bh=qLL7/2AZfEul3vbHvFBFM/9D4fPVUtl9AgZbDDDmqPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0SVdr1MyvSGh8x5P00ONbjDcpYyF+2ZybRVmUpFiHUoQ1YIEUjf05nlRyBVbSsP2D JZBBvvJUhegeUopEr6GWb1zKXPd08uQflj0GVNjTPipNB0D3lZ2irQqiDgswyNccIU B7K6NQjG2dOy0i2VRySJObv3CASq0rixHPfoT1CA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lucas Stach , Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.19 024/205] media: coda: dont overwrite h.264 profile_idc on decoder instance Date: Mon, 19 Nov 2018 17:25:31 +0100 Message-Id: <20181119162621.727529798@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lucas Stach [ Upstream commit 1f32061e843205f6fe8404d5100d5adcec334e75 ] On a decoder instance, after the profile has been parsed from the stream __v4l2_ctrl_s_ctrl() is called to notify userspace about changes in the read-only profile control. This ends up calling back into the CODA driver where a missing check on the s_ctrl caused the profile information that has just been parsed from the stream to be overwritten with the default baseline profile. Later on the driver fails to enable frame reordering, based on the wrong profile information. Fixes: 347de126d1da (media: coda: add read-only h.264 decoder profile/level controls) Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/coda/coda-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -1804,7 +1804,8 @@ static int coda_s_ctrl(struct v4l2_ctrl break; case V4L2_CID_MPEG_VIDEO_H264_PROFILE: /* TODO: switch between baseline and constrained baseline */ - ctx->params.h264_profile_idc = 66; + if (ctx->inst_type == CODA_INST_ENCODER) + ctx->params.h264_profile_idc = 66; break; case V4L2_CID_MPEG_VIDEO_H264_LEVEL: /* nothing to do, this is set by the encoder */