From patchwork Sun Mar 3 15:10:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten X-Patchwork-Id: 777877 Received: from mail.rmail.be (mail.rmail.be [85.234.218.189]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDC9E67E74 for ; Sun, 3 Mar 2024 15:27:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.234.218.189 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709479640; cv=none; b=Zqo+CGb0LwkFXszYOlZrdUTCa3n8aeUnpLBu/DO21xXnFBlgC14JxY6SYNnD8+xxKh/NnZia3Lu0jXvMVPrP/afs2cYrJZpurRvBKLgehB7VPwqzi6eeLoaokdqL3lzoUDcev8zN123Ul8nmGDk8bxTU7xD1b6fVbsqIRDCMV6k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709479640; c=relaxed/simple; bh=ib2QZTG768ATOSPdjs7PNFUprADMw0C0VDI5M9E/yDI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mG635qRkTK0dEq/pquOSH9fh7QW8GDAOZzLBGAbSRZnIolvyUofoOOhWL5DZt1lYQgOVwA794WV680k7L8l+BBdLiUiI+TTi6e/N4ovVzQt3XbqxI7szEcCxn4HU1xbxNXXq3i7GcDLGP+0Wv5yBgg8BvBd8E+c2KJiTnfNd7TQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rmail.be; spf=pass smtp.mailfrom=rmail.be; arc=none smtp.client-ip=85.234.218.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rmail.be Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rmail.be Received: from localhost.rmail.be (unknown [10.238.9.208]) by mail.rmail.be (Postfix) with ESMTP id D5A374C090; Sun, 3 Mar 2024 16:27:17 +0100 (CET) From: Maarten Vanraes To: Raspberry Pi Kernel Maintenance , linux-media@vger.kernel.org Cc: Kieran Bingham , Laurent Pinchart , Umang Jain , Dave Stevenson , Maarten Vanraes Subject: [RFC PATCH 07/13] staging/vchiq-mmal: Add buffer flags for interlaced video Date: Sun, 3 Mar 2024 16:10:02 +0100 Message-ID: <20240303152635.2762696-8-maarten@rmail.be> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240303152635.2762696-1-maarten@rmail.be> References: <20240303152635.2762696-1-maarten@rmail.be> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Dave Stevenson Add the buffer flags that the firmware uses to identify fields on interlaced video Signed-off-by: Dave Stevenson Signed-off-by: Maarten Vanraes --- .../vc04_services/vchiq-mmal/mmal-msg.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h index ef84b4e35608..baf37254645a 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h @@ -253,6 +253,25 @@ struct mmal_msg_port_action_reply { /* Signals that a buffer failed to be transmitted */ #define MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED BIT(10) +/* Video buffer header flags + * videobufferheaderflags + * The following flags describe properties of a video buffer header. + * As there is no collision with the MMAL_BUFFER_HEADER_FLAGS_ defines, these + * flags will also be present in the MMAL_BUFFER_HEADER_T flags field. + */ +#define MMAL_BUFFER_HEADER_FLAG_FORMAT_SPECIFIC_START_BIT 16 +#define MMAL_BUFFER_HEADER_FLAG_FORMAT_SPECIFIC_START \ + (1 << MMAL_BUFFER_HEADER_FLAG_FORMAT_SPECIFIC_START_BIT) +/* Signals an interlaced video frame */ +#define MMAL_BUFFER_HEADER_VIDEO_FLAG_INTERLACED \ + (MMAL_BUFFER_HEADER_FLAG_FORMAT_SPECIFIC_START << 0) +/* + * Signals that the top field of the current interlaced frame should be + * displayed first + */ +#define MMAL_BUFFER_HEADER_VIDEO_FLAG_TOP_FIELD_FIRST \ + (MMAL_BUFFER_HEADER_FLAG_FORMAT_SPECIFIC_START << 1) + struct mmal_driver_buffer { u32 magic; u32 component_handle;