From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753483AbeCTNmz (ORCPT ); Tue, 20 Mar 2018 09:42:55 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:55286 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753256AbeCTNmx (ORCPT ); Tue, 20 Mar 2018 09:42:53 -0400 X-Google-Smtp-Source: AG47ELu5eMyvldaBb6ZpsT0gxp6owapWugSaMEW9Y13yuojHjXAVwmYGZ8VGJ1R0S19zJuGM34PzOw== Subject: Re: [PATCH v2] venus: vdec: fix format enumeration To: Alexandre Courbot , Stanimir Varbanov Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180319093229.76253-1-acourbot@chromium.org> From: Stanimir Varbanov Message-ID: <35d51db4-bbca-e76a-abff-ed74172a5fe2@linaro.org> Date: Tue, 20 Mar 2018 15:42:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180319093229.76253-1-acourbot@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alex, Thanks! On 03/19/2018 11:32 AM, Alexandre Courbot wrote: > find_format_by_index() stops enumerating formats as soon as the index > matches, and returns NULL if venus_helper_check_codec() finds out that > the format is not supported. This prevents formats to be properly > enumerated if a non-supported format is present, as the enumeration will > end with it. > > Fix this by moving the call to venus_helper_check_codec() into the loop, > and keep enumerating when it fails. > > Fixes: 29f0133ec6 media: venus: use helper function to check supported codecs > > Signed-off-by: Alexandre Courbot > --- > drivers/media/platform/qcom/venus/vdec.c | 13 +++++++------ > drivers/media/platform/qcom/venus/venc.c | 13 +++++++------ > 2 files changed, 14 insertions(+), 12 deletions(-) Acked-by: Stanimir Varbanov -- regards, Stan