From patchwork Mon Mar 23 23:29:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaaira Gupta X-Patchwork-Id: 3294 Return-Path: Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B782860417 for ; Tue, 24 Mar 2020 00:30:50 +0100 (CET) Received: by mail-pl1-x642.google.com with SMTP id h11so6597028plk.7 for ; Mon, 23 Mar 2020 16:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1vG2OcOONhiCi516JQ58atnaISi+UA4wXON7pv1Ssck=; b=EZkdel9Wam2ErzeSCkDHrsO+zKtvHSAJoanTNYVIIjnvPnQ6NXUp5U81skBXs/AvD8 HW31fF+BhkIseZ5sv55hNR2aMyC1LU2K/YpXFijjc7Gp7I1OGxCY8LkXlrjl84HKcuGa jr8hsrvj1NrCPo+cl4/AiB2RTw+92Fnn58pjuKJ32tFd07B22ffY7RVUWxcLg7U0smfQ xrbBA+nEiM8nP8VD6i1m+0MruyfhPM4+JXpsIV5J3cfZgEkzjbhSZGRhtJ27RES1ax1L NEolqYQCi9anj+CIyh6A9r+fLnSV+rIFTAOdH4/WaEmFm0Rt48iQchwo0/OOGXmifd3E HbJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1vG2OcOONhiCi516JQ58atnaISi+UA4wXON7pv1Ssck=; b=V7TZUHl9+Pv+TlD2CP+wMIkN24C2Y9WFOggCug0x8V5Vtwc27gPYWp2EptPKk5TjZw PTq36WAOV/yWhf4hjv0f/3p6HYtQTHl7Gkc6AVUYMe67NCbplSJyjC79DU0W9Uobub6B ZJnQ4XW1YSidchQgH0aA+RVjBpxfL1zjfm7ykA4vYBJWamdjZ5FMuAAihOVrOosVry0l wnnb47yvn+WHbKSMAJxO9e+nLzvkZKVNaUklSgDA2eVnYEd5HEp39GTcUZ0npuaR104j DDdCWdTWAfFPDusrvqNW/0dH78Rm82oO6nO4AdhGUsFp46iOzGL5qn0zZpYAxokT7ZL1 H86Q== X-Gm-Message-State: ANhLgQ1eCVNVcA7iWq1jYoT4V9dmXbufFWNwRoU+JjKYX4tObvKrdEs/ y/+MbG+bjavGAvvI0vINO3vV3g== X-Google-Smtp-Source: ADFU+vv+V0LEwPqsqDmjMEDUOsnGSejo4aiDD1EkEInzRLI0zP3qjWP2HsOoggDSgUzc2OZrGIvUrA== X-Received: by 2002:a17:90a:364d:: with SMTP id s71mr1814998pjb.185.1585006249314; Mon, 23 Mar 2020 16:30:49 -0700 (PDT) Received: from kaaira-HP-Pavilion-Notebook ([103.113.213.154]) by smtp.gmail.com with ESMTPSA id x4sm12783546pgi.76.2020.03.23.16.30.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 16:30:48 -0700 (PDT) From: Kaaira Gupta To: libcamera-devel@lists.libcamera.org, Kieran Bingham , Helen Koike , Vaishali Thakkar Cc: Kaaira Gupta Date: Tue, 24 Mar 2020 04:59:01 +0530 Message-Id: <20200323232901.29169-4-kgupta@es.iitr.ac.in> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200323232901.29169-1-kgupta@es.iitr.ac.in> References: <20200323232901.29169-1-kgupta@es.iitr.ac.in> Subject: [libcamera-devel] [PATCH 3/3] libcamera: pipeline: ipu3: Use parameterized StreamConfiguration X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 23:30:50 -0000 Replace default constructor StreamConfiguration() by it's parameterized counterpart by using StreamFormats in generateConfiguration() in ipu3. Signed-off-by: Kaaira Gupta --- src/libcamera/pipeline/ipu3/ipu3.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 7feb44c..fe25cab 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -400,9 +400,17 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera, }; config = new IPU3CameraConfiguration(camera, data); + std::map> pixelformats; + + /* + * The driver supports only one pixel format. + * Size range is kept maximum. + */ + pixelformats[PixelFormat(DRM_FORMAT_NV12)] = {SizeRange{{ 2560, 1920 }}}; for (const StreamRole role : roles) { - StreamConfiguration cfg = {}; + StreamFormats format(pixelformats); + StreamConfiguration cfg(format); IPU3Stream *stream = nullptr; cfg.pixelFormat = PixelFormat(DRM_FORMAT_NV12);