From patchwork Tue Jun 30 19:50:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaaira Gupta X-Patchwork-Id: 209232 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06B4FC433DF for ; Tue, 30 Jun 2020 19:51:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D536B20772 for ; Tue, 30 Jun 2020 19:51:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=es-iitr-ac-in.20150623.gappssmtp.com header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.b="oCSHK38q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728435AbgF3TvD (ORCPT ); Tue, 30 Jun 2020 15:51:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728141AbgF3TvC (ORCPT ); Tue, 30 Jun 2020 15:51:02 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0267C03E979 for ; Tue, 30 Jun 2020 12:51:01 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id y18so8899955plr.4 for ; Tue, 30 Jun 2020 12:51:01 -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; bh=ZBKhPH2eOj78fdRxQESh5z9MefWxohtucDof9Au70c8=; b=oCSHK38qHA3h7x8nQ3ie1Ji+667P+uNGr518mAyd4wB1cfXINEPL4Awq7DVvOwoC4D sTdvHKxf2wjy8ksGkoGNm8G/if3JRZW716VZ50wyRtVdvlef7Dscsdw+xew8eydpY2nA gS1bo5p4xDkd61yoqeedcGy2TG1837VlugsRkdKpiU0/uXcOpV+W5aD8HI8O3Yi2kT4A Zid02nGJhcDAyIIyO0Khb9p5dc2CFr7bKDc+oYhm1t9Ig+vd7kWsZgmJ+ACbSIYFeA5q y1WO2eqVvdrNTCtUNFDp2kD/UmON/ciq4l9QqXQrXAganlR/RPqr15WP4Uop0U+WZ3Ym uB+w== 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; bh=ZBKhPH2eOj78fdRxQESh5z9MefWxohtucDof9Au70c8=; b=qVKcgL65lsZZf+4a8qSYXv87YuoC/O3den87i6ilXfbGTz0uwQtu40DhTf5vxriElk mfggCnkeriLZ9Ne1/ladAYhyd1KREnnTWkTSbbPDj6x1Rj59Nnrv7RgzVpyNlkUFKq0F buSH7tbQO2/srQkrNFBwn6UR0Yt8txDAI+eDTgUYpI6xMOR4d0gqKMW80yVE2nAxwn/y zWNKeIvEEfbDzaH1WMYEPIPMrx+3/C7Ry2FiEmneoTyNJKKldmAwu/j+KNQ5ebOQ82SE xhT/4RN5XPt2zgS5GYssNwKWNr07ixmr1j+uY1nJv4bpI+g9slf1D2+qO0XP4qKHllWS r96w== X-Gm-Message-State: AOAM531JYAI9y0OeFJ5U+U0QZdl6ALYlYnIRJtPhFj5ldASiDiuKUd99 XC5AxKTqNoT9R8kRTP5bF6Hmzg== X-Google-Smtp-Source: ABdhPJxpLnqqCjd7c5irLWhkJ3MT7ltWgE1cp48scosszOeV4cAuiYu60P4/diMi7vVTrWghSeFGDg== X-Received: by 2002:a17:90a:ac0a:: with SMTP id o10mr933122pjq.235.1593546661311; Tue, 30 Jun 2020 12:51:01 -0700 (PDT) Received: from kaaira-HP-Pavilion-Notebook ([103.113.213.178]) by smtp.gmail.com with ESMTPSA id s188sm3337163pfb.118.2020.06.30.12.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2020 12:51:00 -0700 (PDT) From: Kaaira Gupta To: Helen Koike , Shuah Khan , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, hverkuil@xs4all.nl, Kieran Bingham Cc: Kaaira Gupta Subject: [PATCH v8 0/3] media: Add colors' order and other info over test image Date: Wed, 1 Jul 2020 01:20:49 +0530 Message-Id: <20200630195052.23880-1-kgupta@es.iitr.ac.in> X-Mailer: git-send-email 2.17.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This patchset aims to add a method to display the correct order of colors for a test image generated. It does so by adding a function which returns a string of correct order of the colors for a test pattern. It then adds a control in vimc which displays the string over test image. It also displays some other information like saturation, hue, contrast brightness and time since the stream started over test image generated by vimc. Changes since v7: In patch 3: - Use fallthrough; to indicate a fall through in switch-case - Use enum type instead of int for osd_value - Change varaible to osd_value instead of osd_mode as the enum osd_mode defines the modes. Changes since v6: In patch 3: - Use switch case instead of if() - reorder declarartions. Changes since v5: In patch 2: - Add missing EXPORT_SYMBOL_GPL() In patch 3: - Renamed varaibles. - use u64 instead of int for getting current time in nanoseconds. - Use enum instead of numbers to describe the state of osd_mode control in code. Changes since v4: - Add another patch which changes char argument to const char in function tpg_gen_text() - Return const char * from function tpg_g_color_order() in patch 2 In 3rd patch: - Check font in probe() instead of s_stream() - Use dev_err instead of pr_err - Fix errors in commit message. - Base VIMC_CID_SHOW_INFO on VIVID_CID_OSD_TEXT_MODE Changes since v3: In 1st patch: -Improved formatting of returned string. In 2nd patch: - Add CID prefix in control name and change it to a more generic name. - Rename bool variable to a generic name. - Disable text rendering instead of stopping stream if no font found. - Display more info like VIVID in VIMC. Changes since v2: In 1st patch: - Create a 'define' to prevent repetition of the common color sequence string. - Use 'fallthrough' on case statement to prevent repetition of code. Changes since v1: - Divided the patch into two patches. - Returned NULL for patterns whose color order cannot be defined. (Reported-by: kernel test robot ) - Made separate switch cases for separate test patterns (Reported-by: kernel test robot ) - Renamed variables from camelcase to use '_' - prefixed 'media' to the patches. Kaaira Gupta (3): media: tpg: change char argument to const char media: tpg: Add function to return colors' order of test image media: vimc: Add a control to display info on test image drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 40 +++++++++-- drivers/media/test-drivers/vimc/Kconfig | 2 + drivers/media/test-drivers/vimc/vimc-common.h | 1 + drivers/media/test-drivers/vimc/vimc-core.c | 10 +++ drivers/media/test-drivers/vimc/vimc-sensor.c | 67 +++++++++++++++++++ include/media/tpg/v4l2-tpg.h | 3 +- 6 files changed, 115 insertions(+), 8 deletions(-)