Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp787125ybh; Wed, 11 Mar 2020 10:47:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu/a+428mN8UnHBxc/LLvZURMC2uxtdOv+5q25yQ5j2dEjIWtMyuRxSMurHWu+LmiAYBaBD X-Received: by 2002:a4a:dc98:: with SMTP id g24mr1059381oou.16.1583948861416; Wed, 11 Mar 2020 10:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583948861; cv=none; d=google.com; s=arc-20160816; b=hcqjCVp1umWnHLI9FgE4UVn/OrOQKOCy8VVxJpsMoaioA8T8bi5Ign6VGKxgL8YH9+ EaQHJz0zUhx9Kraaz6ukqS0QIOYYPElLAnACC16rrUhTvvkNfhFf4XbNhSBoqsXeP/Xb ImQHkHS8QQR7XnjEXrqC+QjX+30mDPfSII9JeevqoJOUjKtt6Z6cE7M2suVaUPAydoNx PQINPMUhqL948qDgOyBy2qKbVX+yMxlP51NdpflXvZnzUhX+B3RoQ0VkzXUGF/9bfLoo 59fprOlvOj8urff9j4tHbD1sKq4e206E2Df6ZdLFxQFU67q8z2ZYlVIUKsnbdTFS+XBJ ggWQ== 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 :message-id:date:subject:cc:to:from; bh=wpUV2Q17Eop078tQwpReWW90HRuyQxfOKZ8UjaS+GJw=; b=BcB6UA20GXlohQ1Y/oacgUsW8tSBm7dLcxKAON8nvMY44s9m/mctcIpxrnqFCUewx1 sLmW0fs8c6I93KL6zfzm3T3lUCnu07COZc67ChxJcJxqhs8UcR7wJdKw2MMPb3edRQuc APCwK3IykGXORnwnPxtpguYS07PGmcV4updUdC4UFGwpS/OUZLwNaeWELX6N7JCwE/4b ItXas+j34kpOZUBGLVUQgwfplnTfoKh91IlPPZUTfg8p2oElyDaEAa1Wo6rijo2WQty6 e6bi9CBwBdegaNcipfJiJHjJxoYazj8xPnlH/JE3mAcHm6zwehGnwWJUz/9ijDJvonWW IzWw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6si1360801oia.33.2020.03.11.10.47.30; Wed, 11 Mar 2020 10:47:41 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730626AbgCKRrL (ORCPT + 99 others); Wed, 11 Mar 2020 13:47:11 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:33042 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730487AbgCKRrL (ORCPT ); Wed, 11 Mar 2020 13:47:11 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id A91D02912DA From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Tomasz Figa , Nicolas Dufresne , kernel@collabora.com, Jonas Karlman , Heiko Stuebner , Hans Verkuil , Alexandre Courbot , Jeffrey Kardatzke , Ezequiel Garcia Subject: [PATCH 0/6] hantro: set of small cleanups and fixes Date: Wed, 11 Mar 2020 14:42:54 -0300 Message-Id: <20200311174300.19407-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, Here's a few patches with some cleanups and fixes. The main idea here is to address two issues, and while at it, clean the driver a bit. The first issue can be found in Patch 1, when the Request API is used, the CAPTURE buffer should be returned _before_ the OUTPUT buffer, to avoid waking up userspace prematurely. I noticed this issue while working on the rkvdec driver, but this time I've decided to tackle it at the core, in v4l2_m2m_buf_done_and_job_finish(). The second issue is a simple compliance issue, which is solved by refactoring the driver, dealing with internal set format properly. I suspect it's really late for v5.7, but if we are still in time, that would be lovely. Thanks, Ezequiel Ezequiel Garcia (6): v4l2-mem2mem: return CAPTURE buffer first hantro: Set buffers' zeroth plane payload in .buf_prepare hantro: Use v4l2_m2m_buf_done_and_job_finish hantro: Remove unneeded hantro_dec_buf_finish hantro: Move H264 motion vector calculation to a helper hantro: Refactor for V4L2 API spec compliancy drivers/media/v4l2-core/v4l2-mem2mem.c | 11 +- drivers/staging/media/hantro/hantro.h | 4 - drivers/staging/media/hantro/hantro_drv.c | 37 ++----- drivers/staging/media/hantro/hantro_hw.h | 31 ++++++ drivers/staging/media/hantro/hantro_v4l2.c | 111 +++++++++++---------- 5 files changed, 108 insertions(+), 86 deletions(-) -- 2.25.0