'프로그램 사용'에 해당되는 글 2392건

  1. 2022.06.29 weston drm debug
  2. 2022.06.27 libwayland debug 메시지
  3. 2022.06.27 libwayland
  4. 2022.06.13 gnuplot
  5. 2022.06.08 weston desktop-shell output destory
  6. 2022.06.02 gcc vectorization 실패
  7. 2022.05.27 sdl tutorial
  8. 2022.05.24 blender on macos
  9. 2022.05.22 big bunny blender project file
  10. 2022.05.17 ncurse example
프로그램 사용/wayland2022. 6. 29. 18:02

 

# echo 0x3 > /sys/module/drm/parameters/debug

[링크 : https://lynxbee.com/how-to-enable-drm-driver-debug-logging-in-linux/#.YrwTKHZBxhE]

 

dmesg 에서 확인이 가능한데.. 0x3 만 해도 dmesg를 넘기는지 금세 라인수 초과..

[28951.482225] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_GET_MAGIC
[28951.482235] [drm:drm_getmagic] 1
[28951.482244] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_AUTH_MAGIC
[28951.482250] [drm:drm_authmagic] 1
[28951.482255] [drm:drm_ioctl] comm="weston", pid=1707, ret=-22
[28951.482263] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_SET_MASTER
[28951.482281] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_MODE_ATOMIC
[28951.482300] [drm:drm_mode_object_get] OBJ ID: 44 (2)
[28951.482308] [drm:drm_mode_object_get] OBJ ID: 46 (2)
[28951.482316] [drm:drm_mode_object_get] OBJ ID: 45 (3)
[28951.482320] [drm:drm_mode_object_put.part.0] OBJ ID: 44 (3)
[28951.482325] [drm:drm_mode_object_put.part.0] OBJ ID: 45 (4)
[28951.482329] [drm:drm_mode_object_put.part.0] OBJ ID: 45 (3)
[28951.482339] [drm:drm_mode_object_put.part.0] OBJ ID: 46 (5)
[28951.482344] [drm:drm_mode_object_put.part.0] OBJ ID: 46 (4)
[28951.482354] [drm:drm_mode_object_get] OBJ ID: 39 (4)
[28951.482358] [drm:drm_mode_object_get] OBJ ID: 39 (5)
[28951.482363] [drm:drm_mode_object_put.part.0] OBJ ID: 39 (6)
[28951.482425] imx-drm display-subsystem: [drm:drm_calc_timestamping_constants] crtc 33: hwmode: htotal 1344, vtotal 806, vdisplay 768
[28951.482433] imx-drm display-subsystem: [drm:drm_calc_timestamping_constants] crtc 33: clock 65000 kHz framedur 16665600 linedur 20676
[28951.485362] imx-drm display-subsystem: [drm:drm_handle_vblank] vblank event on 396086, current 396086
[28951.485368] [drm:drm_mode_object_put.part.0] OBJ ID: 40 (4)
[28951.485379] [drm:drm_mode_object_put.part.0] OBJ ID: 40 (3)
[28951.485385] [drm:drm_mode_object_put.part.0] OBJ ID: 49 (3)
[28951.485394] [drm:drm_mode_object_put.part.0] OBJ ID: 43 (2)

'프로그램 사용 > wayland' 카테고리의 다른 글

capture drm screen  (0) 2022.08.08
weston redraw 취소하기  (0) 2022.07.07
libwayland debug 메시지  (0) 2022.06.27
libwayland  (0) 2022.06.27
weston desktop-shell output destory  (0) 2022.06.08
Posted by 구차니
프로그램 사용/wayland2022. 6. 27. 17:24

export WAYLAND_DEBUG=1 하면 libwayland*.so 들의 디버그 메시지가 출력되는데

대~~~애충 아래와 같은 포맷

[1492172.627] wl_surface@17.leave(wl_output@16)
[1492172.707]  -> wl_surface@17.set_buffer_scale(1)
[1492172.745]  -> wl_surface@17.frame(new id wl_callback@27)
[1492192.837]  -> wl_surface@17.attach(wl_buffer@26, 0, 0)
[1492192.934]  -> wl_surface@17.damage(0, 0, 806, 606)
[1492192.973]  -> wl_surface@17.commit()
[1492208.877] wl_display@1.delete_id(27)
[1492208.938] wl_buffer@26.release()
[1492208.957] wl_callback@27.done(22885913)

 

send와 discard는 상위에서 보내주는 대로 설정되는거고, 해당 내용에 따라 출력이 되는 듯.

@00 식으로 나오는건 인자에 따라 출력되는 값인데.. 함수 인자가 어떤걸 의미하는진 따로 찾아봐야 할 듯..

void wl_closure_print(struct wl_closure *closure, struct wl_object *target,
 int send, int discarded, uint32_t (*n_parse)(union wl_argument *arg))
{
// ...
fprintf(f, "[%7u.%03u] %s%s%s@%u.%s(",
time / 1000, time % 1000,
discarded ? "discarded " : "",
send ? " -> " : "",
target->interface->name, target->id,
closure->message->name);

[링크 : https://gitlab.freedesktop.org/wayland/wayland/-/blob/main/src/connection.c#L1286]

[링크 : https://gitlab.freedesktop.org/wayland/wayland]

'프로그램 사용 > wayland' 카테고리의 다른 글

weston redraw 취소하기  (0) 2022.07.07
weston drm debug  (0) 2022.06.29
libwayland  (0) 2022.06.27
weston desktop-shell output destory  (0) 2022.06.08
weston debug message  (0) 2022.03.18
Posted by 구차니
프로그램 사용/wayland2022. 6. 27. 17:07

도대체.. 넌 또 머냐 -_-

 

[링크 : https://gitlab.freedesktop.org/wayland/wayland]

 

wayland_debug 라고 했듯.. libwayland의  디버깅이지 weston의 디버깅이 아니었나..

To get the logs of the wayland protocol messages, set this environment variable:

 export WAYLAND_DEBUG=1

[링크 : https://wiki.st.com/stm32mpu/wiki/How_to_debug_Weston]

'프로그램 사용 > wayland' 카테고리의 다른 글

weston drm debug  (0) 2022.06.29
libwayland debug 메시지  (0) 2022.06.27
weston desktop-shell output destory  (0) 2022.06.08
weston debug message  (0) 2022.03.18
weston drm atomic  (0) 2022.03.17
Posted by 구차니
프로그램 사용/gnuplot2022. 6. 13. 19:12

그래프 그리는 유틸리티. 써본적이 있던가?

 

$ gnuplot

Command 'gnuplot' not found, but can be installed with:

sudo apt install gnuplot-nox
sudo apt install gnuplot-qt
sudo apt install gnuplot-x11

 

[링크 : https://alvinalexander.com/technology/gnuplot-charts-graphs-examples/]

[링크 : https://stackoverflow.com/questions/30315114/]

'프로그램 사용 > gnuplot' 카테고리의 다른 글

gnuplot 예제  (0) 2023.06.07
Posted by 구차니

drm 에서 HDMI hotplug를 아래 코드에서 처리하는데 shell로 어떻게 넘겨주는진 발견하지 못했다.

static int
udev_drm_event(int fd, uint32_t mask, void *data)
{
struct drm_backend *b = data;
struct udev_device *event;
uint32_t conn_id, prop_id;

event = udev_monitor_receive_device(b->udev_monitor);

if (udev_event_is_hotplug(b, event)) {
if (udev_event_is_conn_prop_change(b, event, &conn_id, &prop_id))
drm_backend_update_conn_props(b, conn_id, prop_id);
else
drm_backend_update_heads(b, event);
}

udev_device_unref(event);

return 1;
}

static void
drm_backend_update_heads(struct drm_backend *b, struct udev_device *drm_device)
{
/* collect new connectors that have appeared, e.g. MST */
for (i = 0; i < resources->count_connectors; i++) {
uint32_t connector_id = resources->connectors[i];

head = drm_head_find_by_connector(b, connector_id);
if (head) {
drm_head_update_info(head);
} else {
head = drm_head_create(b, connector_id, drm_device);
if (!head)
weston_log("DRM: failed to create head for hot-added connector %d.\n",
   connector_id);
}
}
}

static void
drm_head_update_info(struct drm_head *head)
{
drmModeConnector *connector;

connector = drmModeGetConnector(head->backend->drm.fd,
head->connector_id);
if (!connector) {
weston_log("DRM: getting connector info for '%s' failed.\n",
   head->base.name);
return;
}

if (drm_head_assign_connector_info(head, connector) < 0)
drmModeFreeConnector(connector);

if (head->base.device_changed)
drm_head_log_info(head, "updated");
}

static void
drm_head_log_info(struct drm_head *head, const char *msg)
{
if (head->base.connected) {
weston_log("DRM: head '%s' %s, connector %d is connected, "
   "EDID make '%s', model '%s', serial '%s'\n",
   head->base.name, msg, head->connector_id,
   head->base.make, head->base.model,
   head->base.serial_number ?: "");
} else {
weston_log("DRM: head '%s' %s, connector %d is disconnected.\n",
   head->base.name, msg, head->connector_id);
}
}

 

다만.. 아래의 코드에서 등록되어 output이 파괴될때 트리거 되어 작동하는 녀석만 발견함.

static void
handle_output_destroy(struct wl_listener *listener, void *data);

static void
create_shell_output(struct desktop_shell *shell,
struct weston_output *output)
{
struct shell_output *shell_output;

shell_output = zalloc(sizeof *shell_output);
if (shell_output == NULL)
return;

shell_output->output = output;
shell_output->shell = shell;
shell_output->destroy_listener.notify = handle_output_destroy;
wl_signal_add(&output->destroy_signal,
      &shell_output->destroy_listener);
wl_list_insert(shell->output_list.prev, &shell_output->link);

if (wl_list_length(&shell->output_list) == 1)
shell_for_each_layer(shell,
     shell_output_changed_move_layer, NULL);
}

static void
handle_output_create(struct wl_listener *listener, void *data)
{
struct desktop_shell *shell =
container_of(listener, struct desktop_shell, output_create_listener);
struct weston_output *output = (struct weston_output *)data;

create_shell_output(shell, output);
}


static void
setup_output_destroy_handler(struct weston_compositor *ec,
struct desktop_shell *shell)
{
struct weston_output *output;

wl_list_init(&shell->output_list);
wl_list_for_each(output, &ec->output_list, link)
create_shell_output(shell, output);

shell->output_create_listener.notify = handle_output_create;
wl_signal_add(&ec->output_created_signal,
&shell->output_create_listener);

shell->output_move_listener.notify = handle_output_move;
wl_signal_add(&ec->output_moved_signal, &shell->output_move_listener);
}

WL_EXPORT int
wet_shell_init(struct weston_compositor *ec,
       int *argc, char *argv[])
{
setup_output_destroy_handler(ec, shell);
}

'프로그램 사용 > wayland' 카테고리의 다른 글

libwayland debug 메시지  (0) 2022.06.27
libwayland  (0) 2022.06.27
weston debug message  (0) 2022.03.18
weston drm atomic  (0) 2022.03.17
wayvnc 실행 실패  (0) 2022.02.17
Posted by 구차니
프로그램 사용/gcc2022. 6. 2. 14:47

아래 에러들은 SIMD 명령으로 변환하는데 실패한 녀석들인것 같은데

아래와 같은 유형들이 에러로 발생했다.

 

반복문이 중첩되거나, 반복문 내에서 조건문이 있으면 안되는 것 같고

tt.c:180:3: note: ===== analyze_loop_nest =====
tt.c:180:3: note: === vect_analyze_loop_form ===
tt.c:180:3: note: not vectorized: control flow in loop.
tt.c:180:3: note: bad loop form.


tt.c:61:3: note: ===== analyze_loop_nest =====
tt.c:61:3: note: === vect_analyze_loop_form ===
tt.c:61:3: note: not vectorized: multiple nested loops.
tt.c:61:3: note: bad loop form.

 

아래부터는 어떤 에러인지 감이 안오는 녀석들..

지원하지 않는 패턴

tt.c:83:7: note: Unsupported pattern.
tt.c:83:7: note: not vectorized: unsupported use in stmt.
tt.c:83:7: note: unexpected pattern.

 

지원되지 않는 데이터 타입. 코드를 보니 for문의 비교문에

함수 포인터를 통한 참조(->) 로 보려고 할때는 타입을 추적 못하는 듯?

tt.c:107:5: note: not vectorized: unsupported data-type
tt.c:107:5: note: can't determine vectorization factor.

 

no grouped store가 어떤건지 모르겠다.

val = data[];

out = data / 255;

이런식으로 단순화 가능한 코드인데 배열과 포인터로 배열 인자가 선형으로 분석될수 없기 때문에 그런걸지도?

tt.c:106:3: note: not vectorized: no grouped stores in basic block.
tt.c:106:3: note: ===vect_slp_analyze_bb===
tt.c:106:3: note: ===vect_slp_analyze_bb===
tt.c:108:32: note: === vect_analyze_data_refs ===
tt.c:108:32: note: not vectorized: not enough data-refs in basic block.

 

모르겠고..

tt.c:228:3: note: not vectorized: data ref analysis failed _47 = *_46;
tt.c:228:3: note: bad data references.

 

모르겠다!!!

tt.c:238:5: note: not vectorized: not suitable for gather load _47 = *_46;
tt.c:238:5: note: bad data references.

 

 

아무튼 AVX로도 변환이 안되는데 .. NEON으로 최적화 될만한 코드는 더더욱 아닐 것 같네.

'프로그램 사용 > gcc' 카테고리의 다른 글

gcc tree vectorize  (0) 2023.01.26
gcc fstack-protector-strong  (0) 2022.12.06
gcc / 문자열 선언  (0) 2022.03.17
static link  (0) 2022.02.07
구조체 타입과 변수명은 구분된다?  (0) 2021.11.18
Posted by 구차니
프로그램 사용/sdl2022. 5. 27. 23:35

mac에서 되나 궁금해서 검색. 된다고는 하는데 openGL deprecate 된대서 어떻게 될지 모르겠네

 

[링크 : https://github.com/MikeShah/SDL2_Tutorials]

[링크 : https://wiki.libsdl.org/Tutorials]

'프로그램 사용 > sdl' 카테고리의 다른 글

SDL - Simple DirectMedia Layer  (0) 2021.07.06
libsdl + mfc  (0) 2017.02.09
SDL - Simple DirectMedia Layer  (0) 2011.12.12
Posted by 구차니
프로그램 사용/Blender2022. 5. 24. 21:46

인스톨러 이쁘게 잘 만들었네

 

초기 메뉴에서 spacebar가 기본값이 재생인데 이경우에는 shift-space 로 도구를 띄우고

도구로 되어있으면 shift-space 가 재생으로 작동한다.

'프로그램 사용 > Blender' 카테고리의 다른 글

blender render node  (0) 2024.03.20
BGE / UPBGE(Blender game engine)  (0) 2023.10.20
big bunny blender project file  (0) 2022.05.22
블렌더 강좌? (유료)  (0) 2021.08.07
blender 포켓몬 애니메이션  (0) 2020.08.08
Posted by 구차니
프로그램 사용/Blender2022. 5. 22. 22:53

문득 블렌더 돌려보고 싶어서 다운로드 하다가

blender로 만든 동영상이 생각나서 다운로드 해두려고 검색

 

[링크 : http://bbb3d.renderfarming.net/explore.html]

[링크 : http://distribution.bbb3d.renderfarming.net/blender/blender.zip]

'프로그램 사용 > Blender' 카테고리의 다른 글

BGE / UPBGE(Blender game engine)  (0) 2023.10.20
blender on macos  (0) 2022.05.24
블렌더 강좌? (유료)  (0) 2021.08.07
blender 포켓몬 애니메이션  (0) 2020.08.08
blender physical simulation  (0) 2018.03.19
Posted by 구차니
프로그램 사용/ncurses2022. 5. 17. 08:17

make menuconfig 하면 먼가 그럴싸하게 그려주는게 ncurses 인데

라이브러리는 curses.h 이다. 찾아보니 New Curses 라서 ncurses라고..

[링크 : https://ko.wikipedia.org/wiki/Ncurses]

 

좌표만 주면 알아서 써주는 것 같은데

드래그 하면 창 크기 알아서 읽어서 박스 그리는건 어떻게 해야하려나?

/*

  CURHELLO.C
  ==========
  (c) Copyright Paul Griffiths 1999
  Email: mail@paulgriffiths.net

  "Hello, world!", ncurses style.

*/


#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>                  /*  for sleep()  */
#include <curses.h>


int main(void) {

    WINDOW * mainwin;

    
    /*  Initialize ncurses  */

    if ( (mainwin = initscr()) == NULL ) {
fprintf(stderr, "Error initialising ncurses.\n");
exit(EXIT_FAILURE);
    }


    /*  Display "Hello, world!" in the centre of the
screen, call refresh() to show our changes, and
sleep() for a few seconds to get the full screen effect  */

    mvaddstr(13, 33, "Hello, world!");
    refresh();
    sleep(3);


    /*  Clean up after ourselves  */

    delwin(mainwin);
    endwin();
    refresh();

    return EXIT_SUCCESS;
}

[링크 : https://www.paulgriffiths.net/program/c/srcs/curhellosrc.html]

[링크 : http://www.paulgriffiths.net/program/c/curses.php]

 

API
[링크 : https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html]

'프로그램 사용 > ncurses' 카테고리의 다른 글

ncurse screen size  (0) 2025.09.30
ncurses 상자 및 색상 적용하기  (0) 2024.12.02
ncurses 예제  (0) 2024.11.30
ncurse  (0) 2015.04.27
Posted by 구차니