Show a patch.

GET /api/1.1/patches/1597/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1597,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/1597/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1597/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<ad664ad979c72b809821f47d5755256d615a17a8.1562185292.git.helen.koike@collabora.com>",
    "date": "2019-07-03T20:21:53",
    "name": "[libcamera-devel,1/2] libcamera: pipeline: RKISP1 remove rockchip-sy-mipi-dphy",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "70e807e618047ff5547c45fb6b3c668c943f885f",
    "submitter": {
        "id": 20,
        "url": "https://patchwork.libcamera.org/api/1.1/people/20/?format=api",
        "name": "Helen Koike",
        "email": "helen.koike@collabora.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/1597/mbox/",
    "series": [
        {
            "id": 394,
            "url": "https://patchwork.libcamera.org/api/1.1/series/394/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=394",
            "date": "2019-07-03T20:21:53",
            "name": "[libcamera-devel,1/2] libcamera: pipeline: RKISP1 remove rockchip-sy-mipi-dphy",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/394/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1597/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1597/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<helen.koike@collabora.com>",
        "Received": [
            "from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1763D60C01\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Jul 2019 22:22:10 +0200 (CEST)",
            "from [127.0.0.1] (localhost [127.0.0.1])\n\t(Authenticated sender: koike) with ESMTPSA id 047EF28AAD2"
        ],
        "From": "Helen Koike <helen.koike@collabora.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "laurent.pinchart@ideasonboard.com, kernel@collabora.com,\n\tHelen Koike <helen.koike@collabora.com>",
        "Date": "Wed,  3 Jul 2019 17:21:53 -0300",
        "Message-Id": "<ad664ad979c72b809821f47d5755256d615a17a8.1562185292.git.helen.koike@collabora.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 1/2] libcamera: pipeline: RKISP1 remove\n\trockchip-sy-mipi-dphy",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "X-List-Received-Date": "Wed, 03 Jul 2019 20:22:10 -0000"
    },
    "content": "Remove subdevice rockchip-sy-mipi-dphy from the pipeline.\nSensors are connected direcly to rkisp1-isp-subdev.\n\nSigned-off-by: Helen Koike <helen.koike@collabora.com>\n\n---\nHello,\n\nThis depends on the v7[1] of driver being accepted upstream. But I'm\nsubmitting anyway for reference.\n\n[1] https://patchwork.kernel.org/project/linux-media/list/?series=141793\n\nThanks\nHelen\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 34 +++++-------------------\n utils/rkisp1/rkisp1-capture.sh           |  4 +--\n 2 files changed, 8 insertions(+), 30 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 4a5898d..358e2c8 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -104,7 +104,6 @@ private:\n \tvoid bufferReady(Buffer *buffer);\n \n \tMediaDevice *media_;\n-\tV4L2Subdevice *dphy_;\n \tV4L2Subdevice *isp_;\n \tV4L2VideoDevice *video_;\n \n@@ -201,8 +200,7 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n }\n \n PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)\n-\t: PipelineHandler(manager), dphy_(nullptr), isp_(nullptr),\n-\t  video_(nullptr)\n+\t: PipelineHandler(manager), isp_(nullptr), video_(nullptr)\n {\n }\n \n@@ -210,7 +208,6 @@ PipelineHandlerRkISP1::~PipelineHandlerRkISP1()\n {\n \tdelete video_;\n \tdelete isp_;\n-\tdelete dphy_;\n }\n \n /* -----------------------------------------------------------------------------\n@@ -250,7 +247,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \t * Configure the sensor links: enable the link corresponding to this\n \t * camera and disable all the other sensor links.\n \t */\n-\tconst MediaPad *pad = dphy_->entity()->getPadByIndex(0);\n+\tconst MediaPad *pad = isp_->entity()->getPadByIndex(0);\n \n \tfor (MediaLink *link : pad->links()) {\n \t\tbool enable = link->source()->entity() == sensor->entity();\n@@ -282,18 +279,14 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \n \tLOG(RkISP1, Debug) << \"Sensor configured with \" << format.toString();\n \n-\tret = dphy_->setFormat(0, &format);\n-\tif (ret < 0)\n-\t\treturn ret;\n-\n-\tret = dphy_->getFormat(1, &format);\n-\tif (ret < 0)\n-\t\treturn ret;\n+\tLOG(RkISP1, Debug) << \"Configuring ISP with \" << format.toString();\n \n \tret = isp_->setFormat(0, &format);\n \tif (ret < 0)\n \t\treturn ret;\n \n+\tLOG(RkISP1, Debug) << \"ISP configured with \" << format.toString();\n+\n \tV4L2DeviceFormat outputFormat = {};\n \toutputFormat.fourcc = cfg.pixelFormat;\n \toutputFormat.size = cfg.size;\n@@ -393,14 +386,6 @@ int PipelineHandlerRkISP1::initLinks()\n \tif (ret < 0)\n \t\treturn ret;\n \n-\tlink = media_->link(\"rockchip-sy-mipi-dphy\", 1, \"rkisp1-isp-subdev\", 0);\n-\tif (!link)\n-\t\treturn -ENODEV;\n-\n-\tret = link->setEnabled(true);\n-\tif (ret < 0)\n-\t\treturn ret;\n-\n \tlink = media_->link(\"rkisp1-isp-subdev\", 2, \"rkisp1_mainpath\", 0);\n \tif (!link)\n \t\treturn -ENODEV;\n@@ -442,17 +427,12 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n \tdm.add(\"rkisp1_mainpath\");\n \tdm.add(\"rkisp1-statistics\");\n \tdm.add(\"rkisp1-input-params\");\n-\tdm.add(\"rockchip-sy-mipi-dphy\");\n \n \tmedia_ = acquireMediaDevice(enumerator, dm);\n \tif (!media_)\n \t\treturn false;\n \n \t/* Create the V4L2 subdevices we will need. */\n-\tdphy_ = V4L2Subdevice::fromEntityName(media_, \"rockchip-sy-mipi-dphy\");\n-\tif (dphy_->open() < 0)\n-\t\treturn false;\n-\n \tisp_ = V4L2Subdevice::fromEntityName(media_, \"rkisp1-isp-subdev\");\n \tif (isp_->open() < 0)\n \t\treturn false;\n@@ -471,10 +451,10 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n \t}\n \n \t/*\n-\t * Enumerate all sensors connected to the CSI-2 receiver and create one\n+\t * Enumerate all sensors connected to the ISP receiver and create one\n \t * camera instance for each of them.\n \t */\n-\tpad = dphy_->entity()->getPadByIndex(0);\n+\tpad = isp_->entity()->getPadByIndex(0);\n \tif (!pad)\n \t\treturn false;\n \ndiff --git a/utils/rkisp1/rkisp1-capture.sh b/utils/rkisp1/rkisp1-capture.sh\nindex cffe9fe..8a6f6eb 100755\n--- a/utils/rkisp1/rkisp1-capture.sh\n+++ b/utils/rkisp1/rkisp1-capture.sh\n@@ -68,12 +68,10 @@ configure_pipeline() {\n \n \t$mediactl -r\n \n-\t$mediactl -l \"'$sensor':0 -> 'rockchip-sy-mipi-dphy':0 [1]\"\n-\t$mediactl -l \"'rockchip-sy-mipi-dphy':1 -> 'rkisp1-isp-subdev':0 [1]\"\n+\t$mediactl -l \"'$sensor':0 -> 'rkisp1-isp-subdev':0 [1]\"\n \t$mediactl -l \"'rkisp1-isp-subdev':2 -> 'rkisp1_mainpath':0 [1]\"\n \n \t$mediactl -V \"\\\"$sensor\\\":0 [$format]\"\n-\t$mediactl -V \"'rockchip-sy-mipi-dphy':1 [$format]\"\n \t$mediactl -V \"'rkisp1-isp-subdev':0 [$format crop:(0,0)/$sensor_size]\"\n \t$mediactl -V \"'rkisp1-isp-subdev':2 [fmt:$capture_mbus_code/$capture_size crop:(0,0)/$capture_size]\"\n }\n",
    "prefixes": [
        "libcamera-devel",
        "1/2"
    ]
}